MEANS effects </ options>;
Within each group corresponding to each effect specified in the MEANS statement, PROC GLM computes the arithmetic means and standard deviations of all continuous variables in the model (both dependent and independent). You can specify only classification effects in the MEANS statement—that is, effects that contain only classification variables.
Note that the arithmetic means are not adjusted for other effects in the model; for adjusted means, see the section LSMEANS Statement.
If you use a WEIGHT statement, PROC GLM computes weighted means; see the section Weighted Means.
You can also specify options to perform multiple comparisons. However, the MEANS statement performs multiple comparisons only for maineffect means; for multiple comparisons of interaction means, see the section LSMEANS Statement.
You can use any number of MEANS statements, provided that they appear after the MODEL
statement. For example, suppose A
and B
each have two levels. Then, if you use the statements
proc glm; class A B; model Y=A B A*B; means A B / tukey; means A*B; run;
the means, standard deviations, and Tukey’s multiple comparisons tests are displayed for each level of the main effects A
and B
, and just the means and standard deviations are displayed for each of the four combinations of levels for A
*B
. Since multiple comparisons tests apply only to main effects, the single MEANS statement
means A B A*B / tukey;
produces the same results.
PROC GLM does not compute means for interaction effects containing continuous variables. Thus, if you have the model
class A; model Y=A X A*X;
then the effects X
and A
*X
cannot be used in the MEANS statement. However, if you specify the effect A
in the means statement
means A;
then PROC GLM, by default, displays withinA
arithmetic means of both Y
and X
. You can use the DEPONLY
option to display means of only the dependent variables.
means A / deponly;
If you use a WEIGHT statement, PROC GLM computes weighted means and estimates their variance as inversely proportional to the corresponding sum of weights (see the section Weighted Means). However, note that the statistical interpretation of multiple comparison tests for weighted means is not well understood. See the section Multiple Comparisons for formulas. Table 46.8 summarizes the options available in the MEANS statement.
Table 46.8: MEANS Statement Options
Option 
Description 

Modify output 

Displays only means for the dependent variables 

Perform multiple comparison tests 

Performs Bonferroni t tests 

Performs Duncan’s multiple range test 

Performs Dunnett’s twotailed t test 

Performs Dunnett’s lower onetailed t test 

Performs Dunnett’s upper onetailed t test 

Performs Gabriel’s multiplecomparison procedure 

Performs the RyanEinotGabrielWelsch multiple range test 

Performs Scheffé’s multiplecomparison procedure 

Performs pairwise t tests on differences between means 

Performs pairwise comparisons based on the studentized maximum modulus and Sidak’s uncorrelatedt inequality 

Performs the StudentNewmanKeuls multiple range test 

Performs pairwise t tests 

Performs Tukey’s studentized range test (HSD) 

Performs the WallerDuncan kratio t test 

Specify additional details for multiple comparison tests 

Specifies the level of significance 

Presents confidence intervals for all pairwise differences between means 

Presents results as intervals for the mean of each level of the variables 

Specifies the error mean square used in the multiple comparisons 

Specifies the type of mean square for the error effect 

Specifies the MS type for the hypothesis MS 

Specifies the Type 1/Type 2 error seriousness ratio 

Lists the means in descending order and indicating nonsignificant subsets by line segments 

Prevents the means from being sorted into descending order 

Test for homogeneity of variances 

Requests a homogeneity of variance test 

Compensate for heterogeneous variances 

Requests the varianceweighted oneway ANOVA of Welch (1951) 
The options available in the MEANS statement are described in the following list.