Skip to content
Prev 243879 / 398506 Next

Tukey Test, lme, error: less than two groups

Lilith,
You need to look, in particular, at what's in your variable "Provenancef." 

##
PAMdata$Provenancef
levels(PAMdata$Provenancef)

And if the call to glht() is returning an object you need to inspect
obj$linfct. It contains the contrast matrix (for Tukey contrasts) and needs
to match the number of coefficients in your model. Try the following for
further clues:

glht(PAM.lme, linfct = mcp(Provenancef = "Tukey"))$linfct
coef(PAMaov)

Regards, Mark.