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 ...

Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.