The GLM Procedure |
The following statements are available in PROC GLM:
Although there are numerous statements and options available in PROC GLM, many applications use only a few of them. Often you can find the features you need by looking at an example or by quickly scanning through this section.
To use PROC GLM, the PROC GLM and MODEL statements are required. You can specify only one MODEL statement (in contrast to the REG procedure, for example, which allows several MODEL statements in the same PROC REG run). If your model contains classification effects, the classification variables must be listed in a CLASS statement, and the CLASS statement must appear before the MODEL statement. In addition, if you use a CONTRAST statement in combination with a MANOVA, RANDOM, REPEATED, or TEST statement, the CONTRAST statement must be entered first in order for the contrast to be included in the MANOVA, RANDOM, REPEATED, or TEST analysis.
Table 39.2 summarizes the positional requirements for the statements in the GLM procedure.
Statement |
Must Precede... |
Must Follow... |
||
first RUN statement |
||||
first RUN statement |
||||
MODEL statement |
||||
MODEL statement |
||||
or RANDOM statement |
||||
MODEL statement |
||||
first RUN statement |
||||
first RUN statement |
||||
MODEL statement |
||||
CONTRAST or |
||||
MODEL statement |
||||
MODEL statement |
||||
CLASS statement |
||||
statement |
||||
MODEL statement |
||||
CONTRAST or |
||||
MODEL statement |
||||
or TEST statement |
||||
MANOVA or |
MODEL statement |
|||
REPEATED statement |
||||
first RUN statement |
Table 39.3 summarizes the function of each statement (other than the PROC statement) in the GLM procedure.
Statement |
Description |
---|---|
absorbs classification effects in a model |
|
specifies variables to define subgroups for the analysis |
|
declares classification variables |
|
constructs and tests linear functions of the parameters |
|
estimates linear functions of the parameters |
|
specifies a frequency variable |
|
identifies observations on output |
|
computes least squares (marginal) means |
|
performs a multivariate analysis of variance |
|
computes and optionally compares arithmetic means |
|
defines the model to be fit |
|
requests an output data set containing diagnostics for each observation |
|
declares certain effects to be random and computes expected mean squares |
|
performs multivariate and univariate repeated measures analysis of variance |
|
constructs tests that use the sums of squares for effects and the error term you specify |
|
specifies a variable for weighting observations |
The rest of this section gives detailed syntax information for each of these statements, beginning with the PROC GLM statement. The remaining statements are covered in alphabetical order.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.