[R] TukeyHSD & Covariates

Damián Cirelli damian.cirelli at maine.edu
Wed Dec 15 22:31:02 CET 2004


Dear R gurus,
I have the following model:

appcov.aov <- aov(yield ~ prevyield + trt + block)

where prevyield is a continuous numeric covariate and trt and block are 
factors (yes, I did factor()!)
Now, when I do a TukeyHSD, my diff's are all screwed up!
For instance:
treatment mean for treatmen "E" is 277.25 and for treatment "O" is 
279.5, so I figure the diff O-E should be 2.25, but TukeyHSD says:

          diff         lwr        upr
O-E -50.817101 -84.8112057 -16.822996

So I wonder where is that -50.8 coming from???

Anybody have a clue?

Thanks a lot!

PS: it works if I take prevyield (the covariate) out of the model, but 
the point is I need to analyse it with the covariate.
Thanks again




More information about the R-help mailing list