Computing Statistics Using PROC MEANS

Descriptive statistics such as the mean, minimum, and maximum provide useful information about numeric data. The MEANS procedure provides these and other data summarization tools, as well as helpful options for controlling your output.


Procedure Syntax

The MEANS procedure can include many statements and options for specifying needed statistics. For simplicity, let's consider the procedure in its basic form.



General form, basic MEANS procedure:
PROC MEANS <DATA=SAS-data-set>
<statistic-keyword(s)> <option(s)>;
RUN;

where

  • SAS-data-set is the name of the data set to be used
  • statistic-keyword(s) specify the statistics to compute
  • option(s) control the content, analysis, and appearance of output.


In its simplest form, PROC MEANS prints the n-count (number of nonmissing values), the mean, the standard deviation, and the 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