| The SURVEYMEANS Procedure |
PROC SURVEYMEANS Statement
- PROC SURVEYMEANS < options > <
statistic-keywords > ;
In the PROC SURVEYMEANS statement, you can use
statistic-keywords to specify statistics for the
procedure to compute.
-
statistic-keywords
-
specifies the statistics for the procedure to compute.
If you do not specify any statistic-keywords, PROC
SURVEYMEANS computes the NOBS, MEAN, STDERR, and CLM
statistics by default.
The statistics produced depend on the type of the
analysis variable. If you name a numeric variable in
the CLASS statement, then the procedure analyzes that
variable as a categorical variable. The procedure
always analyzes character variables as categorical.
PROC SURVEYMEANS computes MIN, MAX, and RANGE for
numeric variables but not for categorical variables.
For numeric variables, the keyword MEAN produces the
mean, but for categorical variables it produces the
proportion in each category or level. Also for
categorical variables, the keyword NOBS produces the
number of observations for each variable level, and the
keyword NMISS produces the number of missing
observations for each level. If you request the keyword
NCLUSTER for a categorical variable, PROC SURVEYMEANS
displays for each level the number of clusters with
observations in that level. PROC SURVEYMEANS computes
SUMWGT in the same way for both categorical and numeric
variables,
as the sum of the weights over all nonmissing
observations.
PROC SURVEYMEANS performs univariate analysis, analyzing
each variable separately. Thus, the number of nonmissing
and missing observations may not be the same for all
analysis variables.
If you use the keyword RATIO without the keyword MEAN,
the keyword MEAN is implied.
Other available statistics computed for a ratio are
N, NCLU, SUMWGT, RATIO, STDERR, DF, T, PROBT, and CLM,
as listed below. If no statistics are requested, the
procedure will compute the ratio and its standard error
by default for a RATIO statement.
The valid statistic-keywords are as follows:
- ALL
- all statistics listed
- CLM
% confidence limits for the
MEAN, where
is determined by the
ALPHA= option, and the default is

- CLSUM
% confidence limits for
the SUM, where
is determined by the
ALPHA= option, and the default is

- CV
- coefficient of variation for MEAN
- CVSUM
- coefficient of variation for SUM
- DF
- degrees of freedom for the t test
- MAX
- maximum value
- MEAN
- mean for a numeric variable,
or the proportion in each category for a categorical
variable
- MIN
- minimum value
- NCLUSTER
- number of clusters
- NMISS
- number of missing observations
- NOBS
- number of nonmissing observations
- RANGE
- range, MAX-MIN
- RATIO
- ratio of means or proportions
- STD
- standard deviation of the SUM. When you
request SUM, the procedure computes STD by
default.
- STDERR
- standard error of the MEAN or RATIO. When you
request MEAN or RATIO, the procedure computes
STDERR by default.
- SUM
- weighted sum,
, or estimated
population total when the appropriate
sampling weights are used
- SUMWGT
- sum of the weights,

- T
- t-value and its corresponding
p-value with DF
degrees of freedom for

where
is the population mean or
the population ratio
- VAR
- variance of the MEAN or RATIO
- VARSUM
- variance of the SUM
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.