Specifies the variables whose values define the subgroup combinations
for the analysis.
specifies one or more variables that the procedure uses
to group the data. Variables in a CLASS statement are referred to as class variables. Class variables are numeric or character. Class
variables can have continuous values, but they typically have a few discrete
values that define levels of the variable. You do not have to sort the data
by class variables.
specifies to sort the class variable levels in ascending
specifies to sort the class variable levels in descending
excludes from the analysis all combinations of the class
variables that are not found in the preloaded range of user-defined formats.
specifies not to apply formats to the class variables when
PROC MEANS groups the values to create combinations of class variables.
considers missing values as valid values for the class variable
levels. Special missing values that represent numeric values (the letters
A through Z and the underscore (_) character) are each considered as a separate
ORDER=DATA | FORMATTED | FREQ | UNFORMATTED
specifies the order to group the levels of the class variables
in the output, where
orders values according to their order in the input data
orders values by their ascending formatted values. This
order depends on your operating environment.
orders values by descending frequency count so that levels
with the most observations are listed first.
orders values by their unformatted values, which yields
the same order as PROC SORT. This order depends on your operating environment.
This sort sequence is particularly useful for displaying dates chronologically.
specifies that all formats are preloaded for the class variables.
Using the BY statement is similar to using the CLASS statement
and the NWAY option in that PROC MEANS summarizes each BY group as an independent
subset of the input data. Therefore, no overall summarization of the input
data is available. However, unlike the CLASS statement, the BY statement requires
that you previously sort BY variables.
When you use the NWAY option, PROC MEANS may encounter insufficient
memory to the summarization all the class variables. You can move some class
variables to the BY statement. For maximum benefit, move class variables to
the BY statement that are already sorted or that have the greatest number
of unique values.
You can use the CLASS and BY statements together to analyze the data
by the levels of class variables within BY groups. See Using the BY Statement with Class Variables.
By default, if an observation contains a missing value for any
class variable, PROC MEANS excludes that observation from the analysis. If
you specify the MISSING option in the PROC statement, the procedure considers
missing values as valid levels for the combination of class variables.
Specifying the MISSING option in the CLASS statement allows you to control
the acceptance of missing values for individual class variables.
The total of unique class values that PROC MEANS allows depends
on the amount of computer memory that is available. See
for more information.
The GROUPINTERNAL option can improve computer performance because the
grouping process is based on the internal values of the class variables. If
a numeric class variable is not assigned a format and you do not specify GROUPINTERNAL,
PROC MEANS uses the default format to format numeric values as character strings.
Then PROC MEAN groups these numeric variables by their character values, which
takes additional time and computer memory.
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.