[R] aov and lme differ with interaction in oats example of MASS?

From: Karl Knoblick <karlknoblich_at_yahoo.de>
Date: Thu, 28 Jun 2007 11:08:10 +0000 (GMT)


Dear R-Community!

The example "oats" in MASS (2nd edition, 10.3, p.309) is calculated for aov and lme without interaction term and the results are the same. But I have problems to reproduce the example aov with interaction in MASS (10.2, p.301) with lme. Here the script:

library(MASS)
library(nlme)
options(contrasts = c("contr.treatment", "contr.poly"))

# aov: Y ~ N + V
oats.aov <- aov(Y ~ N + V + Error(B/V), data = oats, qr = T) summary(oats.aov)
# now lme

oats.lme<-lme(Y ~ N + V, random = ~1 | B/V, data = oats) anova(oats.lme, type="m") # Ok!
# aov:Y ~ N * V + Error(B/V)
oats.aov2 <- aov(Y ~ N * V + Error(B/V), data = oats, qr = T) summary(oats.aov2)
# now lme - my trial!
oats.lme2<-lme(Y ~ N * V, random = ~1 | B/V, data = oats) anova(oats.lme2, type="m")
# differences!!! (except of interaction term)

My questions:
1) Is there a possibility to reproduce the result of aov with interaction using lme? 2) If not, which result of the above is the correct one for the oats example?

Thanks a lot!
Karl

      __________________________________  Alles was der Gesundheit und Entspannung dient. BE A BETTER MEDIZINMANN! www.yahoo.de/clever

______________________________________________
R-help_at_stat.math.ethz.ch 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. Received on Thu 28 Jun 2007 - 13:53:05 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 28 Jun 2007 - 14:32:36 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.