Computing Statistics for Numeric Variables |
Selecting Statistics and
Variables |
Procedure Syntax
The MEANS procedure can include many statements and options for specifying needed statistics. For the sake of simplicity, let's look at a few key statements and consider the procedure in its basic form. |
General form, basic MEANS procedure:
where
|
In its simplest form, PROC MEANS prints the n-count (number
of non-missing values), mean, standard deviation, and minimum and maximum
values of every numeric variable in a data set.
proc means data=perm.survey; run; |
Variable | N | Mean | Std Dev | Minimum | Maximum |
Item1 Item2 Item3 Item4 Item5 Item6 Item7 Item8 Item9 Item10 Item11 Item12 Item13 Item14 Item15 Item16 Item17 Item18 |
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 |
3.7500000 3.0000000 4.2500000 3.5000000 3.0000000 3.7500000 3.0000000 2.7500000 3.0000000 3.2500000 3.0000000 2.7500000 2.7500000 3.0000000 3.0000000 2.5000000 3.0000000 3.2500000 |
1.2583057 1.6329932 0.5000000 1.2909944 1.6329932 1.2583057 1.8257419 1.5000000 1.4142136 1.2583057 1.8257419 0.5000000 1.5000000 1.4142136 1.6329932 1.9148542 1.1547005 1.2583057 |
2.0000000 1.0000000 4.0000000 2.0000000 1.0000000 2.0000000 1.0000000 1.0000000 2.0000000 2.0000000 1.0000000 2.0000000 1.0000000 2.0000000 1.0000000 1.0000000 2.0000000 2.0000000 |
5.0000000 5.0000000 5.0000000 5.0000000 5.0000000 5.0000000 5.0000000 4.0000000 5.0000000 5.0000000 5.0000000 3.0000000 4.0000000 5.0000000 5.0000000 5.0000000 4.0000000 5.0000000 |
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.