I am using SAS for linear mixed modeling in my dataset. The model also consists of three covariates. During the modeling process, I am also checking on whether there is an interaction between covariates and a group variable (one of the other fixed effect variables). For this, I included three interaction terms in the model between three covariates and the group variable. However, the addition of interaction terms inflates the denominator degree of freedom more than what is expected. Without interaction terms, the denominator degrees of freedom look fine. Any thoughts or suggestions on this?
what happens if you add ddfm=kr option in your MODEL statement in PROC MIXED?
Jill
Or even just ddfm=bw, especially if you have a REPEATED statement and a RANDOM statement. The default in that case is the containment method, which can end up with some very large df for whole plot comparisons. I agree with @jiltao - try ddfm=kr or ddfm=kr2. If the degrees of freedom look approximately like what you expect, it turns into a win-win, as the standard errors will have the proper shrinkage.
SteveDenham
Actually, I was fitting the model with kenward-roger degree of freedom adjustment. And the resulted denominator freedom does not match what is expected. What could be the possible reasons for incorrect ddf computation?
If you can post the code you are using, with and without the interactions, and the output from both then that would give us a better understanding of what is happening here.
Here are the codes and results.
1. Model without interaction
SAS code
proc glimmix data=MY_DATA_soy plots=(residualpanel studentpanel); class Group Time Field Field_Group GroupTime; model logbiomass = CC_percent Blue_Green_ratio SR_RE Group|Time/ ddfm = kenwardroger solution; random intercept Time / subject = Field(Group); output out=DiagnGLIMMIX student=Student predicted=Predicted; run;
Type III test result
2. Model with interaction
proc glimmix data=MY_DATA_soy plots=(residualpanel studentpanel); class Group Time Field Field_Group GroupTime; model logbiomass = CC_percent Blue_Green_ratio SR_RE Group*CC_percent Group*SR_RE Group*Blue_Green_ratio Group|Time/ ddfm = kenwardroger solution; random intercept Time / subject = Field(Group); output out=DiagnGLIMMIX student=Student predicted=Predicted; run;
Type III test result
Mr. Google was my friend today. Searching on "Kenward roger approximation" led to this: https://documentation.sas.com/doc/en/statug/15.2/statug_glimmix_details40.htm
From this you will see that the denominator degrees of freedom is a solution to an equation, rather than the (n-1) or (n-1)(m-1) you think of as the design denominator degrees of freedom. If they happen to come out to the same value, it is because the data are balanced and the covariance matrices associated do not result in any shrinkage of the standard errors.
So if the KR ddfm values are not completely inappropriate (such as ddf =1 in a repeated measures design), they represent a less biased approach to the analysis. Even better for controlling bias would be KR2.
SteveDenham
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.