79665117

Date: 2025-06-13 16:09:39
Score: 2
Natty:
Report link

I got the same problem and I tried installing the package multcompView then I used cld() function with my emmean object, without using pairs(), and I finally got an expected grouping.

For example:

library(tidyverse)
library(lme4)
library(lmerTest)
library(emmeans)
library(multcomp)

formula_str <- "log(OC) ~ sev_dpt * fraction + 1 + (1|Sites)" # where OC is numerical, and the other ones are factors
mod.lme <- lmer(as.formula(formula_str), data = db)

emmeans(mod.lme, list(pairwise~sev_dpt*fraction), adjust="tukey") %>%
  # pairs() %>% # I needed to avoid the use of pairs to make it work
  multcomp::cld()
Reasons:
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (1): I got the same problem
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Luis D. Olivares