I am trying to perform post-hoc tests on a linear mixed-effect model with a significant three-way interaction, whereby two of the two-way interactions are significant. There are two 2-level factors and one continious variable in the three way interaction, plus two covariates and a random intercept. The first factor is time, with two timepoints. The model looks like this:
lmer(DV ~ Fact1_Time * Fact2_Condition * Cont1 + Age + Sex + (1|ID), data)
I have attempted to run post-hoc tests using the emmeans function, but the results seem wrong. How would I perform post hoc tests on significant two way interactions between Fact1_Time * Fact2_Condition
and Fact2_Condition * Cont1
? Any help would be appreciated.
vignette("interactions")
which gives several examples. Typically, with interactions of factors you may want to use 'by' variables or perhaps compute interaction contrasts. With a factor and a covariate, the 'emtrends` function may be used to estimate slopes,then you can usepairs()
to compare them. $\endgroup$