On Apr 21, 2009, at 10:12 AM, William Simpson wrote:

I am trying to do Tukey HSD comparisons on a repeated measures expt.
I found the following example on r-help and quoted approvingly elsewhere.
It is broken. Can anyone please tell me how to get it to work?

I am using R 2.4.1.

How many years have you had that version without updating?


require(MASS) ## for oats data set
require(nlme) ## for lme()
require(multcomp) ## for multiple comparison stuff
Aov.mod <- aov(Y ~ N + V + Error(B/V), data = oats)
Lme.mod <- lme(Y ~ N + V, random = ~1 | B/V, data = oats)
summary(Aov.mod)
anova(Lme.mod)
summary(Lme.mod)
summary(glht(Lme.mod, linfct=mcp(V="Tukey")))
Error in eval(expr, envir, enclos) : object "Y" not found
Error in factor_contrasts(model) : no 'model.matrix' method for 'model' found!

It is not broken when run in version 2.8.1.


David Winsemius, MD
Heritage Laboratories
West Hartford, CT

______________________________________________
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.

Reply via email to