I have this example where I'd like to have multiple comparisons across treatments. Here is the data:
data.1 <-read.csv(text = "
location,treat,response
loc1,T1,120
loc1,T2,60
loc1,T3,59
loc1,T4,10
loc2,T1,129
loc2,T2,55
loc2,T3,59
loc2,T4,8
loc3,T1,134
loc3,T2,60
loc3,T3,58
")
And this is what I did:
library(lme4)
library(lmerTest)
library(emmeans)
library(multcomp)
model.fit <- lmer(response ~ treat + (1|location), data = data.1)
model.fit.emmeans <- emmeans(model.fit, ~ treat,
options = list(estName = "response"))
pairs.comp.glht<-glht(model.fit, linfct=mcp(treat="Tukey"))
pairs.comp.glht.cld <-cld(pairs.comp.glht)
Running this pairs.comp.glht.cld
gave me the output I needed.
I am looking for the value of the minimum difference to call a difference and display a different letter. I am assuming the value should be in this object: pairs.comp.glht
or here pairs.comp.glht.cld
, but I cannot extract the value.