[英]Set x axis range in SAS using proc univariate?
Right now I am using proc univariate to make a histogram in SAS. 现在,我正在使用proc单变量在SAS中制作直方图。
proc univariate data=myData;
var myVar;
histogram / endpoints = 0 to 75 by 5;
run;
However, the output is not taking into account the endpoints option. 但是,输出未考虑端点选项。 Does anyone know what the problem could be? 有谁知道是什么问题? Thank you! 谢谢!
The documentation states: 该文档指出:
The procedure uses the same values for all variables. 该过程对所有变量使用相同的值。 The range of endpoints must cover the range of the data. 端点范围必须覆盖数据范围。
There's also a WARNING in my log when this occurs: 发生这种情况时,我的日志中还会出现一个警告:
WARNING: The ENDPOINTS= list was extended to accommodate the data. 警告:ENDPOINTS =列表已扩展以容纳数据。
https://support.sas.com/documentation/cdl/en/procstat/63104/HTML/default/viewer.htm#procstat_univariate_sect013.htm https://support.sas.com/documentation/cdl/en/procstat/63104/HTML/default/viewer.htm#procstat_univariate_sect013.htm
If you'd like to restrict the data to the values of 0 to 75 use a WHERE
statement. 如果要将数据限制为0到75之间的值,请使用WHERE
语句。
proc univariate data=myData;
WHERE myVar between 0 and 75;
var myVar;
histogram / endpoints = 0 to 75 by 5;
run;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.