[R] general linear hypothesis glht() to work with lme()

array chip arrayprofile at yahoo.com
Thu Jan 10 01:30:50 CET 2008


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




More information about the R-help mailing list