Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- SAS Linear Mixed Modeling

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 02-07-2024 03:42 PM
(954 views)

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?

6 REPLIES 6

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

what happens if you add ddfm=kr option in your MODEL statement in PROC MIXED?

Jill

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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!

What is ANOVA?

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.