If a factor A has 3 levels in the data but the output from PROC GLM shows that A has only 1, or even 0, degrees of freedom rather than 2 as expected, then this might indicate that there are one or more linear dependencies in the design. That is, one factor or a linear combination of several factors might exactly duplicate another factor or linear combination of factors. The E option in the MODEL statement in PROC GLM can help you determine which factors are involved in the linear dependencies. Alternatively, look at the degrees of freedom reported for the effects in the Type I and Type III sums of squares tables. If the degrees of freedom for a particular effect differ between the Type I and Type III tests, then there might be a confounding problem in the model. You can then adjust the model to eliminate the dependencies.
The following example illustrates this issue.
data temp; input A B year y; datalines; 1 2 1980 0.824 1 2 1980 0.585 1 2 1980 0.585 1 2 1980 1.398 1 2 1980 1.523 1 2 1980 2.000 2 1 1980 -.017 2 1 1980 0.398 2 1 1980 0.523 2 1 1980 0.658 3 3 1990 1.322 3 3 1990 1.164 3 3 1990 1.523 3 3 1990 2.319 4 3 2000 1.971 4 3 2000 2.237 4 3 2000 2.222 5 3 2000 1.777 5 3 2000 2.194 ;
proc glm data=temp; class A B year; model y = A B Year / e; run; quit;
Partial results from PROC GLM follow. The degrees of freedom for B and Year are both zero instead of 2 for each as expected. This might suggest a linear dependency in the data. Additionally, the degrees of freedom of A do not agree between the Type I and Type III sums of squares tables, also suggests a confounding problem in the model.
The Estimable Functions table produced by the E option in the MODEL statement can help to identify linear dependencies. The following table shows that the levels for B and the levels for Year can all be expressed as a linear combination of intercept and/or levels of A. You might want to remove both the B and the Year effects from the model.
Another possible cause of fewer than expected degrees of freedom is poorly conditioned data. If the scales of the variables differ by several orders of magnitude (for example, values like 0.001 in one variable and values like 10000 in another), then the data might be poorly conditioned. If you suspect the data are poorly conditioned, then centering or standardizing the data, as can be done using the STANDARD or STDIZE procedure, might help. Centering reduces collinearity (a high correlation) between the predictors and interaction terms and can make the interpretation of the regression coefficients more meaningful.
Note that this issue can also occur in other models, such as generalized linear models, mixed models, survival models, and so on.