Computing Statistics for Numeric Variables |
Selecting Statistics and
Variables |
Specifying Variables
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 To specify the variables that PROC MEANS analyzes, add a VAR statement and list the variable names. |
General form, VAR statement:
where variable(s) lists numeric variables on which to calculate statistics. |
proc means data=clinic.diabetes min max maxdec=0; var age height weight; run; |
Variable | Minimum | Maximum |
Age Height Weight |
15 61 102 |
63 75 240 |
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; |
Variable | Mean | |
Item1 Item2 Item3 Item4 Item5 |
3.75 3.00 4.25 3.50 3.00 |
0.63 0.82 0.25 0.65 0.82 |
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.