Mixed Model – Interpreting Regression Outputs with Categorical Interactions

interactioninterpretationlme4-nlmemodel

I have a question about my use of a mixed model/lmer. The basic model is this:

lmer(DV ~ group * condition + (1|pptid), data= df)

Group and condition are both factors: group has two levels (groupA, groupB) and condition has three levels (condition1, condition2, condition3). It's data from human subjects, so pptid is a random effect for each person.

The model found the following with p value output:

                                   Estimate MCMCmean HPD95lower HPD95upper  pMCMC Pr(>|t|)
(Intercept)                          6.1372   6.1367     6.0418     6.2299 0.0005   0.0000
groupB                              -0.0614  -0.0602    -0.1941     0.0706 0.3820   0.3880
condition2                           0.1150   0.1151     0.0800     0.1497 0.0005   0.0000
condition3                           0.1000   0.1004     0.0633     0.1337 0.0005   0.0000
groupB:condition2                   -0.1055  -0.1058    -0.1583    -0.0610 0.0005   0.0000
groupB:condition3                   -0.0609  -0.0612    -0.1134    -0.0150 0.0170   0.0148

Now, I know that the rows listed compare each level of the factors to the reference level. For group, the reference is groupA and for condition, the reference is condition1.

Would I be correct in interpreting this output in the following way:

  • No overall differences between the groups (hence groupB having a p of >.05)
  • Overall differences between condition 1 and condition 2, and between condition 1 and condition 3.
  • Differences between groupA, condition 1 versus groupB, condition 2 and also between groupA, condition 1 versus group B, condition 3.

Is that correct? I think I'm a little confused about how to interpret this with regards to interactions between levels of two different factors.

I've read various questions on here and done some web searches, and managed to get contrasts set up with glht: would that be a better way to look at the differences between the groups and conditions? I figured that would be the case given the signs of interactions being present here.

Best Answer

Using the given regression table, we can compute the table of expected value of the dependent variable, DV, for each combination of the two factors, which might make this more clear (Note I've used the ordinary estimates, not the MCMC estimates):

$$ \begin{array}{c|cc} \phantom{} & {\rm GroupA} & {\rm GroupB} \\ \hline {\rm Condition1} & 6.1372 & 6.0758 \\ {\rm Condition2} & 6.2522 & 6.0853 \\ {\rm Condition3} & 6.2372 & 6.1149 \\ \end{array} $$

I'll answer your question by responding to your interpretations, referencing this table.

No overall differences between the groups (hence groupB having a p of >.05)

The $p$-value you're referring to is only restricting focus to the reference level of the variable Condition , so it's only testing the difference between the groups when Condition=1 (the first row of the table), i.e. it's only testing whether $6.1372$ is significantly different from $6.0758$.

It's not testing whether there is an overall difference between the groups. To do that test, you'd have to leave Condition out of the model entirely and test the significance of Group.

Overall differences between condition 1 and condition 2, and between condition 1 and condition 3.

Similarly to the first interpretation, this is only comparing Condition2 and Condition3 to the reference level (Condition1) when Group=A. That is, this is only testing whether the second and third entries in the first column are significantly different from $6.1372$. To test for overall differences in the condition variable, you'd need to leave Group out of the model and test condition alone.

Differences between groupA, condition 1 versus groupB, condition 2 and also between groupA, condition 1 versus group B, condition 3.

The interaction terms test whether the effect of one variable depends on the level of the other variable.

For example, significance of the groupB:condition2 term tells you that difference between Condition1 and Condition2 is different when Group=A vs. Group=B. Referencing the table, this means that $$6.2522-6.1372=.115$$ is significantly different from $$6.0853-6.0758=.0095$$ In this particular case it looks like Condition2 is different from Condition1 in GroupA but much less so in GroupB, and that's how I'd interpret this. It appears a similar dynamic is occurring, to a lesser extent, with regard to Condition3.

Related Question