2
$\begingroup$

I have a linear mixed model, which uses a multiply imputed dataset. I saw that LRT could be used to assess Fixed effect significance in linear mixed model. I used testmodels function of the mitml package (D3 Likelihood ratio test). All the variables are factors with 1 or 2 levels.

My full model if : Lmer.X2<-with(implist1, lmer(Dependant ~ X1*X2*X4 +(1| Subj))).

QUESTION : What models do I compare to evaluate the significance of a) X2, b) X2*X1 and c)X1*X2*X4.

For c): I would have tried to compare to evaluate the main effect of X1*X2*X4 :

Lmer.Full<-with(implist1, lmer(Dependant ~ X1*X2*X4 +(1| Subj))).
Lmer.reduced<-with(implist1, lmer(Dependant ~ X1*X2+X4*X1+X2*X4 +(1| Subj))).

For b), I see two alternatives and I not sure of the proper way to do it, as to evaluate the main effect of X1*X2.

Lmer.Full<-with(implist1, lmer(Dependant ~ X1*X2*X4 +(1| Subj))).
Lmer.reduced<-with(implist1, lmer(Dependant ~ X4*X1+X2*X4 +(1| Subj))).

OR

Lmer.Full<-with(implist1, lmer(Dependant ~ X1*X2+(1| Subj))).
Lmer.reduced<-with(implist1, lmer(Dependant ~ X1+X2 +(1| Subj))).

For a), I see two alternatives and I not sure of the proper way to do it, as to evaluate the main effect of X2:

Lmer.Full<-with(implist1, lmer(Dependant ~ X1*X2*X4 +(1| Subj))).
Lmer.reduced<-with(implist1, lmer(Dependant ~ X4*X1 +(1| Subj))).

OR

Lmer.Full<-with(implist1, lmer(Dependant ~ X2+(1| Subj))).
Lmer.reduced<-with(implist1, lmer(Dependant ~ 1 +(1| Subj))).

From my model nested model comparison, for example, I want to be able to say:

The mixed linear regression model results showed a significant effect of X2/X1*X2/X1*X2*X4 (F[df1, df2]=F-statistics],p-value).

$\endgroup$

1 Answer 1

2
$\begingroup$

Although it is convenient to specify variables along with their interaction using the asterisk syntax (for example, X*Y which is shorthand syntax for X + Y + X:Y), in what follows I shall use the expanded syntax, for the reduced models, which should make this easier to follow.

The general approach is to use the "maximal" model as a full model which can then be compared to a reduced model using a likelihood ratio test.

a) Test of the main effect of X2:

This is ambiguous. As you noted, there are at least two things you can do

  1. Test the main effect of X2 while retaining the interaction terms involving X1 andX4, and the interactions involving X2.
Lmer.Full <- with(implist1, lmer(Dependant ~ X1*X2*X4 + (1| Subj)))
Lmer.Reduced <- with(implist1, lmer(Dependant ~ X1 + X4 + X1:X2 + X1:X4 + X2:X4 + X1:X2:X4 + (1| Subj))) 
  1. Test the main effect of X2 while retaining the interaction terms involving X1 and X4, but not the interactions involving X2.
Lmer.Full <- with(implist1, lmer(Dependant ~ X1*X2*X4 + (1| Subj)))
Lmer.Reduced <- with(implist1, lmer(Dependant ~ X1 + X4 + X1:X4 + (1| Subj)))

My recommendation here is option 2, because it effectively isolates the contribution of X2 to the model, which I believe is what you want. Furthermore, the reduced model for option 1 does not make much sense, since it rarely is a good idea to specify an interaction without the main effects. This has been discussed many times here. Here are some of them:

Including the interaction but not the main effects in a model
Do all interactions terms need their individual terms in regression model?

For one of those rare occasions where it does make sense to exclude main effects, see the answer by @Ben in the 2nd of those links.

There is a suggestion in the OP to use these models:

Lmer.Full <- with(implist1, lmer(Dependant ~ X2 + (1| Subj)))
Lmer.Reduced <- with(implist1, lmer(Dependant ~ 1 + (1| Subj)))

However this is troublesome because they test the main effect of X2 ignoring the other predictors and interactions in the full model. This does not reflect the complexity in the question, where X1, X4, and their interactions should be considered, leading to an oversimplified and potentially misleading analysis.

b) Test the interaction X1:X2:

Again, there is more than one way to do this.

  1. Test the interaction while retaining the three-way interaction, and the main effects of X1 and X2.
Lmer.Full <- with(implist1, lmer(Dependant ~ X1*X2*X4 + (1| Subj)))
Lmer.Reduced <- with(implist1, lmer(Dependant ~ X1 + X2 + X4 + X1:X4 + X2:X4 + X1:X2:X4 + (1| Subj)))
  1. Isolate X1:X2 by removing the three-way interaction from the full model:
Lmer.Full <- with(implist1, lmer(Dependant ~ X1*X2*X4 + (1| Subj)))
Lmer.Reduced <- with(implist1, lmer(Dependant ~ X1 + X2 + X4 + X1:X4 + X2:X4 + (1| Subj)))

Again I would recommend option 2 for the same reason: the three-way interaction is an interaction between X1:X2, which we want to test, with X4.

c) Test the three-way interaction X1:X2:X4

Lmer.Full <- with(implist1, lmer(Dependant ~ X1*X2*X4 + (1| Subj)))
Lmer.Reduced <- with(implist1, lmer(Dependant ~ X1 + X2 + X4 + X1:X2 + X1:X4 + X2:X4 + (1| Subj)))
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.