2
$\begingroup$

I have searched other posts and textbooks and found numerous variations of the pairwise comparisions for my mixed effects model using code from the multicomp package as such...How to perform post-hoc test on lmer model?

lsmeansLT(MODEL, pairwise~GROUP, adjust="tukey")

or

summary(glht(MODEL, linfct=mcp(GROUP = "Tukey")))

My data includes four treatments including Burned North, Unburned North, Burned South, and Unburned South facing aspects with snow depth as my response variable. Burned Condition and Aspect are both fixed effects in my model

Depth1 = lmer(Depth~Burn_Con*Aspect+Year+(1|Block), data = snow)

I can compare total burned vs unburned but cannot seem to find how to compare the interaction of burned north and unburned north facing aspects. Trying code like this spits out a number of errors...

summary(glht(Depth1, linfct=mcp(Burn_Con*Aspect = "Tukey")))

Any help would be very much appreciated!

$\endgroup$

1 Answer 1

7
$\begingroup$

Try the emmeans package. Something like

library(emmeans)
emm = emmeans(Depth1, ~ Burn_Con * Aspect)
pairs(emm)
# or for simple comparisons
pairs(emm, simple = “each”)
$\endgroup$
1
  • $\begingroup$ That worked! Thank you so much; I have spent a lot of time trying to figure that out. This response is deeply appreciated. $\endgroup$
    – jdmax29
    Mar 1, 2018 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.