Specifying Variables in PROC MEANS

By default, the MEANS procedure generates statistics for every numeric variable in a data set. But the typical focus is on just a few variables, particularly if the data set is large. It also makes sense to exclude certain types of variables. The values of a numeric identifier variable ID, for example, are unlikely to yield useful statistics.
To specify the variables that PROC MEANS analyzes, add a VAR statement and list the variable names.
Syntax, VAR statement:
VAR variable(s);
variable(s) lists numeric variables for which to calculate statistics.
proc means data=clinic.diabetes min max maxdec=0; 
   var age height weight; 
run;
Figure 9.5 Output with Selected Variables Age, Height, and Weight
Output with Selected Variables Age, Height, and Weight
In addition to listing variables separately, you can use a numbered range of variables.
proc means data=perm.survey mean stderr maxdec=2; 
   var item1-item5; 
run;
Figure 9.6 Output with a Range of Variables Selected
Output with a Range of Variables Selected
Last updated: January 10, 2018
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.192.120