if (requireNamespace("multcomp", quietly = TRUE)) {
library(multcomp)
set.seed(123)
irisr <- cbind(iris,id=sample(4,replace=TRUE,size=nrow(iris)))
irisfit <- fitme(Petal.Length~ Species +(1|id), data=irisr, family=Gamma(log))
summary(glht(irisfit,mcp("Species" = "Tukey"), coef.=fixef.HLfit))
}
Run the code above in your browser using DataLab