Specifying Variables in PROC MEANS

By default, the MEANS procedure generates statistics for every numeric variable in a data set. But you'll typically want to focus 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 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.
General form, VAR statement:
VAR variable(s);
where variable(s) lists numeric variables for which to calculate statistics.
proc means data=clinic.diabetes min max maxdec=0; 
   var age height weight; 
run;
Output with Selected Variables Age, Height, and Weight
In addition to ...

Get SAS Certification Prep Guide: Base Programming for SAS 9, Third 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.