The only obvious typo is the misspelling of "Tukey". Uppercase is
necessary.
But that is not the cause of the current error. I can't duplicate the
problem
from your description. Look at the data.frame data_mcp. If that doesn't
give
you the hint, then you will need to send the data to the list, the standard
"commented, minimal, self-contained, reproducible code."
Rich
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On
Behalf Of Robert Cribbie
Sent: Wednesday, November 07, 2007 12:27 PM
To: r-help at r-project.org
Subject: [R] bug in multcomp?
I am running a linear model with achiev as the outcome and major as my
iv (5 levels). The lm statement runs fine, but for the glht command I
get the following error. I noted that someone else asked the same
question a while back but received no reply. I am hoping someone might
know what is happening.
anovaf2<-lm(achiev ~ major, data=data_mcp)
> pairwise<- glht(anovaf2,linfct = mcp(major = "tukey"))
Error in mcp2matrix(model, linfct = linfct) :
Factor(s) major have been specified in 'linfct' but cannot be
found in 'model'!
Any help would be much appreciated.
Rob.
--
Robert A. Cribbie, PhD
Department of Psychology
York University
Toronto, ON M3J 1P3
Phone: 416-736-2100 x88615
Email: cribbie at yorku.ca
Fax: 416-736-5814
Website: http://www.psych.yorku.ca/cribbie
______________________________________________
R-help at 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.