- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I would like to compare two nested linear mixed models: one without interaction (referred to as model 1) and one with interaction (referred to as model 2).
Interaction term: time (6 classes) x gender (2 classes).
My mentor instructed me to compare these models using the Likelihood Ratio Test. I have reviewed many instructions but still feel confused about a few aspects.
1. For the difference in DF, adding the gender*time interaction would increase the parameters by (6-1) * (2-1)=5. Am I understand it correctly?
2. I conducted tests for both models. Model 1: -2LL=3267, and for Model 2, -2LL=3272. This indicates that adding the interaction increased the deviance and decreased the model fit. In this case, should I proceed with the Likelihood Ratio Test? Because all the instructional materials I have reviewed so far assume that adding variables decreases the deviance. So they calculate the -2LL (reduced model) - -2LL( full model), and if the p is significant, the full model works better. In my case, it is reverse.
If I can proceed with the test, the deviance difference would be 3272-3267=5. Assuming a DF difference of 5, test statistic would be 11.07, and a p-value of 0.041. Does this imply that Model 1 (without the interaction term) improve the results? It sounds a little bit strange..
Thanks for any answers on these questions.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You can switch to METHOD=ML and compare the likelihoods if you use the same covariance structures in both models. The parameter estimates will change if you change the fixed effects. That is not unexpected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Here is an example for PROC GENMOD.
But I think the same rule could apply to PROC MIXED .
24447 - Examples of writing CONTRAST and ESTIMATE statements (sas.com)
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
However, the example is still like all other instructions show: adding an interaction term decreases the deviance. And then, they did the LRT.
While in my case, adding an interaction term increases the deviance. And I don't know if I can still perform the LRT in this situation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posting the code used and actual output will help the community answer your question more quickly and more accurately. Comparison of likelihood stats from competing mixed models can by tricky. Changes in the model can make the comparisons can make those comparisons invalid. Seeing the code will help the community provide a better response. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply. Here is the code. I compared the reduced model with the full model. The only difference is the interaction term. I found that adding interaction terms increased the -2LL (3271 - 3286). So I wonder if this result is correct, and if I could still do the Likelihood ratio test. If yes, will the hypothesis be changed to whether excluding the interaction term helps with model fit?
Reduced model:
PROC MIXED DATA = test METHOD = REML COVTEST;
CLASS record_id time_(ref="6") female(ref="0") race_JL (ref="White")
depression_(ref="0") anxiety_(ref="0") hypertension_(ref="0") overweight(ref="0") fatigue_JL(ref="0")
site_JL(ref="outpatien") vaccine(ref="0") comor_cat (ref="none or mild");
MODEL Score = time_ female race_JL depression_ anxiety_
hypertension_ overweight fatigue_JL site_JL vaccine comor_cat/ SOLUTION OUTpred=PREDDATA S CL;
RANDOM INTERCEPT / SUBJECT = record_id;
repeated time_ / type=ar(1) sub=record_id; store out=MixedModel;
RUN;
Full model:
PROC MIXED DATA = all_long_1 METHOD = REML COVTEST;
CLASS record_id time_(ref="6") female(ref="0") race_JL (ref="White")
depression_(ref="0") anxiety_(ref="0") hypertension_(ref="0") overweight(ref="0") fatigue_JL(ref="0")
site_JL(ref="outpatien") vaccine(ref="0") comor_cat (ref="none or mild");
MODEL Score = time_ female time_*female race_JL depression_ anxiety_
hypertension_ overweight fatigue_JL site_JL vaccine comor_cat/ SOLUTION OUTpred=PREDDATA S CL;
RANDOM INTERCEPT / SUBJECT = record_id;
repeated time_ / type=ar(1) sub=record_id; store out=MixedModel;
RUN;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
So does this mean the mixed model cannot perform the LRT test since it only uses REML?
(I tried changing the syntax from "method = reml" to "method = ml", which gave us the -2LL instead of -2resLL, but it also changed the parameter estimates)
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You can switch to METHOD=ML and compare the likelihoods if you use the same covariance structures in both models. The parameter estimates will change if you change the fixed effects. That is not unexpected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content