I'm having a mixed model (lmer in R) with 5 repeated measurements (time is categorical), and 6 groups, and several covariates. I'm mainly interested in seeing whether there is a significant difference in 'trajectory' between groups comparing timepoint 3 and 5. Can I somehow test for the significance of the interaction specifically contrasting these two timepoints?
When I use an LRT (anova) to test for the interaction variable, of course I test for the overall significance. From the model summary, I only get the interaction between two contrasts (e.g. group 1-2 at timepoint 3-5). When I use the emmeans package and contrasts, i.e.
PCSmeans <-emmeans(lmerFitPCS, ~ time*group6, adjust = "holm") pairs(PCSmeans, simple = "each", adjust='Holm')
I only get the simple contrasts for time or group (e.g. comparing group 1 and 2 at timepoint 3, or comparing group 2 at timepoint 3 and 5). but I would like to get the overall significance of the differences in groups between timepoint 3 and 5.
If I use only a subset of the dataset and use the same model, with only data from timepoints 3 and 5, I can use the LRT test to test the significance I want. However, my model diagnostics (residual plots etc) when I run the model with the subset don't look very good, while the overall model (including all 5 timepoints) does seem to meet the assumptions.
Edit, to make question clear based on @EdM 's comment: I'm looking for a test whether any of the groups differ between those two time points.
What can I do here?
time:groupinteraction there isn't a unique "overall" measure of the difference between time points 3 and 5, as the outcome values at both time points depend on which group is involved. Do you want an average over the individuals in your study, or an average over the 6 groups (weighting them equally regardless of group size), or a test whether any of the groups differs between those time points? Please edit your question to provide that information, as comments are easy to overlook and can be deleted. $\endgroup$
, at = list(time = c(3,5))to the