I'm new to mixed effects modeling, so I need help understanding when it's appropriate to choose a model. So far I've been incrementally building my modeling with main effects and then adding in the interactions.
mod1
includes all 3 main effects and the 3-way interaction. When I write the model out like this, the 3-way interaction is significant. In mod2
, only session:trialtype
is significant.
mod1 <- lmer(rt ~ group + session + trialtype +
group:session:trialtype + (1 | subject),
REML = FALSE, data = data)
mod2 <- lmer(rt ~ group * session * trialtype + (1 | subject),
REML = FALSE, data = data)
Output for mod2
anova(mod2)
Type III Analysis of Variance Table with Satterthwaite's method
Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
group 16431 8215 2 90 0.8911 0.41380
session 211734 211734 1 630 22.9657 2.059e-06 ***
trialtype 14558623 4852874 3 630 526.3673 < 2.2e-16 ***
group:session 35237 17618 2 630 1.9110 0.14879
group:trialtype 14767 2461 6 630 0.2670 0.95223
session:trialtype 84680 28227 3 630 3.0616 0.02766 *
group:session:trialtype 39074 6512 6 630 0.7064 0.64459
How do I decide which is the appropriate model? Or do I use a separate, simpler model that only includes session:trialtype
interaction?