The following examples demonstrate how to interpret the parameter estimates displayed by the SOLUTION option in the MODEL statement of PROC GLM. The examples include a one-way analysis of variance (ANOVA) model, a two-way ANOVA model with interaction, and an analysis of covariance (ANCOVA) model.
In PROC GLM, a predictor variable specified in the CLASS statement is represented in the model by a set of design variables created using GLM parameterization as discussed in SAS Note 22585. This parameterization imposes a particular interpretation on the parameters of the model. This interpretation of parameters, presented below, also applies to other procedures that use the GLM parameterization for CLASS variables such as PROC MIXED and PROC GLIMMIX.
The following statements create the data set to be analyzed and fit a one-way ANOVA model.
data DrugTest; input Drug $ Gender $ X Y @@; datalines; A F 9 25 A F 3 19 A F 4 18 A F 11 28 A F 7 23 A M 11 27 A M 9 24 A M 9 25 A M 10 28 A M 10 26 D F 4 37 D F 12 54 D F 3 33 D F 6 41 D F 9 47 D M 5 36 D M 4 36 D M 7 40 D M 10 46 D M 8 42 G F 10 70 G F 11 75 G F 7 60 G F 9 69 G F 10 71 G M 3 47 G M 8 60 G M 11 70 G M 4 49 G M 4 50 ;
proc glm data=DrugTest; ods select ParameterEstimates; class Drug; model Y = Drug / solution; run;
Following is the table of parameter estimates produced by the SOLUTION option.
This analysis also displays the following message after the parameter estimates table:
NOTE: The X'X matrix has been found to be singular, and a generalized inverse was used to solve the normal equations. Terms whose estimates are followed by the letter 'B' are not uniquely estimable.
This note is generated any time you specify the SOLUTION option in the MODEL statement and your model includes one or more CLASS variables. See SAS Note 22585 for more information.
In this example, the GLM parameterization of the CLASS variable Drug creates three indicator (or "dummy") variables, one for each level of Drug. The GLM parameterization sets the parameter estimate for the last level of each CLASS variable to zero. The last level is considered the reference level. Therefore Drug G is the reference level and has a parameter estimate of 0. The parameter estimates for other levels of Drug represent the difference in the effect of each level compared with the reference level, G. Specifically:
The parameter estimates and tests can be reproduced using appropriate ESTIMATE statements. Doing so clarifies the interpretation of the parameter estimates and the tests provided by the SOLUTION option. The following statements reproduce the results in the parameter estimates table. The linear combination of model parameters specified in each statement is consistent with the interpretations above.
estimate 'Intercept' intercept 1 drug 0 0 1;
estimate 'Drug A' drug 1 0 -1; estimate 'Drug D' drug 0 1 -1;
The following results are produced. Note that the estimates and p-values are identical.
The following example illustrates the results when the model involves an interaction of effects.
proc glm data=DrugTest; ods select ParameterEstimates; class Drug Gender; model Y = Drug Gender Drug*Gender / solution; run;
Following is the table of parameter estimates produced by the SOLUTION option. The singularity note is once again presented since the SOLUTION option is specified and the model includes CLASS variables.
Due to the GLM parameterization of the CLASS variables, the estimates for Drug G and Gender M are set to zero. Similarly, interaction estimates involving at least one of these levels are also set to zero. The parameter estimates of the model are interpreted as follows:
Again, ESTIMATE statements reproducing the parameter estimates and tests clarify the interpretations. The following statements reproduce the results in the parameter estimates table. Note the order of the parameters and their correspondence to variable levels in the parameter estimates table. Hence, drug*gender 0 1 0 0 0 -1 selects the "Drug*Gender A M" parameter and the negative of the "Drug*Gender G M" parameter.
estimate 'Intercept' intercept 1 drug 0 0 1 gender 0 1 drug*gender 0 0 0 0 0 1; estimate 'Drug A' drug 1 0 -1 drug*gender 0 1 0 0 0 -1; estimate 'Drug D' drug 0 1 -1 drug*gender 0 0 0 1 0 -1; estimate 'Gender F' gender 1 -1 drug*gender 0 0 0 0 1 -1; estimate 'Drug A, Gender F' drug*gender 1 -1 0 0 -1 1; estimate 'Drug D, Gender F' drug*gender 0 0 1 -1 -1 1;
The following example illustrates the results when the two-way model involves a categorical (CLASS) predictor, a continuous covariate, and their interaction. This model is a set of three lines, showing the effect of X on Y for each of the three drugs. The general problem of comparing slopes is further discussed in SAS Note 24177.
proc glm data=DrugTest;
ods select ParameterEstimates;
class Drug;
model Y = Drug X Drug*X / solution;
run;
Following is the table of parameter estimates produced by the SOLUTION option. The singularity note is once again presented since the SOLUTION option is specified and the model includes CLASS variables.
Due to the GLM parameterization of the CLASS variables, the estimates for Drug G and the interaction between X and Drug G are set to zero. The parameter estimates of the model are interpreted as follows:
Again, ESTIMATE statements reproducing the parameter estimates and tests clarify the interpretations. The following statements reproduce the results in the parameter estimates table.
estimate 'Intercept' intercept 1 drug 0 0 1 x 0; estimate 'Drug A' drug 1 0 -1 x 0; estimate 'Drug D' drug 0 1 -1 x 0; estimate 'X' x 1 x*drug 0 0 1; estimate 'X*Drug A' x*drug 1 0 -1; estimate 'X*Drug D' x*drug 0 1 -1;