When you specify the DDFM=BW option in the MODEL statement of PROC MIXED, the procedure estimates the denominator degrees of freedom (DDF) for fixed effects based on the between-within method. When there are no common subjects in the model, this may result in zero DDF for classification fixed effects tests. A classification fixed effect is an effect specified in the CLASS statement. Zero DDF also occurs when SUBJECT=INTERCEPT is specified in the REPEATED statement.
When two or more RANDOM statements are specified, common subjects exist when the SUBJECT= option is specified in each of the RANDOM statements and the subject effects are either the same or one is contained in the other. For example, a model with these statements
random intercept / subject=A;
random intercept / subject=B(A);
is a model with common subjects. Two ways in which common subjects do not exist are:
When DDFM=BW is specified and common subjects do not exist in the two ways described above, PROC MIXED assumes each classification fixed effect is a between-subjects effect and assigns zero DDF to the tests for these effects. To avoid the zero DDF problem, consider using other DDF estimation methods such as the residual (DDFM=RESIDUAL) or containment (DDFM=CONTAIN) methods when the data set is large. For small samples, the Kenward-Roger method (DDFM=KR) or the Satterthwaite method (DDFM=SATTERTH) could also be used.
In the following data set, twenty students are randomly chosen from five schools. Each student experienced three treatments (GROUP) and a composite measurement of achievement was recorded (Y).
data achieve;
input school student group y;
datalines;
1 1 1 5.69895
1 1 3 4.34340
1 1 2 4.61630
1 2 3 3.91482
1 2 1 2.61191
1 2 2 2.33590
1 3 1 2.92465
1 3 2 2.36131
1 3 3 1.25319
1 4 2 2.75022
1 4 3 2.64157
1 4 1 4.07234
2 5 3 0.91509
2 5 1 1.97622
2 5 2 0.74898
2 6 2 1.12872
2 6 1 0.52576
2 6 3 2.57277
2 7 1 0.70025
2 7 3 0.78119
2 7 2 0.29533
2 8 3 2.48103
2 8 1 0.51518
2 8 2 0.41726
3 9 2 6.34497
3 9 3 7.45752
3 9 1 3.59545
3 10 1 4.76402
3 10 2 5.29294
3 10 3 6.18353
3 11 2 2.84408
3 11 1 5.34609
3 11 3 7.13153
3 12 1 4.27411
3 12 3 7.21870
3 12 2 6.66396
4 13 3 2.95429
4 13 2 4.16209
4 13 1 2.97158
4 14 1 0.33975
4 14 2 1.53115
4 14 3 1.29274
4 15 3 1.98321
4 15 1 4.41652
4 15 2 1.95476
4 16 2 2.44786
4 16 3 2.41967
4 16 1 2.14794
5 17 2 4.65476
5 17 1 4.15081
5 17 3 3.21462
5 18 1 1.31288
5 18 2 0.23591
5 18 3 1.94378
5 19 2 2.09435
5 19 1 1.34897
5 19 3 3.58635
5 20 2 1.53786
5 20 3 3.35452
5 20 1 4.85353
;
In the following PROC MIXED steps, notice that common subjects do not exist. In the first step, the two subject effects are different. In the second step, the SUBJECT= option is not specified in one RANDOM statement.
proc mixed data=achieve; class group school student; model y=group / solution ddfm=bw; random intercept / subject=school; random intercept / subject=student; run;
proc mixed data=achieve; class group school student; model y=group / solution ddfm=bw; random intercept / subject=school; random student; run;
Since there are no common subjects, the results for both models show zero DDF assigned to the GROUP classification fixed effect.
Unlike PROC MIXED, when PROC GLIMMIX is used in both situations above, GLIMMIX assigns DDF to the classification fixed effects in the same way as the DDFM=CONTAIN option. As a result, GLIMMIX assigns 38 DDF to the GROUP classification fixed effect. PROC MIXED with DDFM=CONTAIN also assigns 38 DDF to the GROUP effect.
When you specify the SUBJECT=INTERCEPT option in the REPEATED statement, which is common when modeling spatial data, PROC MIXED assigns zero DDF to the classification fixed effects tests. For example:
proc mixed data=achieve;
class group school student;
model y=group / solution ddfm=bw;
repeated / subject=intercept type=AR(1);
run;
The results show zero DDF assigned to the GROUP classification fixed effect.
PROC GLIMMIX does the same in this situation. For example, this GLIMMIX step also assigns zero DDF to the GROUP classification fixed effect:
proc glimmix data=achieve;
class group school student;
model y=group / solution ddfm=bw;
random _residual_ / subject=intercept type=AR(1);
run;
Specifying DDFM=CONTAIN avoids the zero DDF problem in both procedures resulting in a test for the GROUP classification fixed effect with 57 DDF.