I'm trying to understand the appropriate "maximal" structure for a mixed effects model, when there are interactions and a between-subjects design.
Let's start simple. Say you have an outcome variable, and one treatment and one control group, and you want to know if the groups are different. So you're looking for a main effect of group and use outcome ~ group + (1|subject)
.
Now say your outcome variable is systematically affected by some other known variable, and the goal of the treatment is to prevent/reverse this effect. You have multiple measurements per subject at each level of this affecting variable. So you're looking for an interaction between group and the affecting variable, and you use output ~ group * affecting_var + (affecting_var|subject)
.
Finally let's say that the goal of the treatment is to prevent/reverse the effect of the affecting variable, but that the treatment takes effect gradually over the course of the measurements. So you're looking for an interaction between group, the affecting variable, and time. Do you use output ~ group * affecting_var * time | (affecting_var * time|subject)
? Or should the random effects structure simply be (affecting_var|subject)
? Or if it depends, what does it depend on?
My thoughts: Since it's a between-subjects design, if what I'm interested in is a group*affecting_var*time interaction, my instinct is that putting (affecting_var * time|subject)
in the random effects structure is going to factor out all the variation I'm interested in. In the second situation above, it's clear to me that a random slope of affecting_var is needed, because this is a known effect and effect sizes across people vary. But time is only of interest because the treatment takes effect gradually; if not for the treatments I would not expect any effects or interactions with time. But it seems to me the default in the "keep it maximal" camp is to put every possible variable and interaction in the random effects structure (if its inclusion is supported by an ANOVA), and it raises suspicions when I don't.