lmer: repeated measures additive model, testing pairwise comparisons

I have a longitudinal data set that contains a repeated measurement of the same participants over 6 different measurement times. I've built my model via lmer in r:

Model <- lmer(output ~ Fa + Yr + Yrs + Age + Hrs + (1|PartID) + (1|Scenario),
data = data)


where the participant id is crossed with the repeated scenario.

I was able to calculate the F-stats and their associated significant levels for an omnibus test, but I need to assess which scenarios the Iv's best predict via a pairwise comparison.

Is there a way to do this under the framework of a repeated measure in lmer?

Additionally, my data is non-parametric and required a permutation of the F-statistics. Is there a method of also permutating the pairwise comparison t-statistics?

Thanks!

1 Answer

There are a few packages that handle objects created by {lme4} commands in R:

• {emmeans}. pairs() function will do pairwise comparisons and give you test statistics. See vignette at CRAN.

• {ggpredict} will do this, as well. See Vignette at CRAN. This package has a focus on returning objects that are ready for plotting.

• {sjPlot} also focuses on plotting, but will show you marginal effects, too. See Vignette via the package's website.

I personally use emmeans, but mainly because that's the one I heard about first.