Hi, I am trying to test some contrasts, using glht() in multcomp package on fixed effects in a linear mixed model fitted with lme() in nlme package. The command I used is:
## a simple randomized block design, ## type is fixed effect ## batch is random effect ## model with interaction dat.lme<-lme(info.index~type, random=~1|batch/type, data=dat) glht(dat.lme, linfct = mcp(type =c("b+t-2*m=0"))) The lme model fit is ok, but I got an error message with glht(): Error in eval(expr, envir, enclos) : object "info.index" not found Error in factor_contrasts(model) : no 'model.matrix' method for 'model' found! according to help page of glht(), it should work with linear mixed model, what is the problem here? Thanks ____________________________________________________________________________________ Be a better friend, newshound, and ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.