[R] anova question
Ulf Mehlig
umehlig at uni-bremen.de
Fri Mar 3 20:44:33 CET 2000
I have a probably very naive question about the R anova/aov functions:
I've found in several text books with descriptions of anova procedures
that, in nested anova (specifying the model "X~A/B", B being a factor
specifying treatments, and A groups of samples within each treatment),
the mean square for "among treatments" is divided by the mean square
"within treatment among sample groups"; R seems to divide by the
residual mean square. So, in the following (silly) example I would
have expected a F value of 1.496/0.785=1.905732:
> test <- data.frame(x=rnorm(12*5), a=rep(1:12,rep(5,12)), b=rep(1:5,rep(12,5)))
> summary(aov(x ~ factor(a)/factor(b), data=test))
Df Sum Sq Mean Sq F value Pr(>F)
factor(a) 11 16.456 1.496 1.8357 0.07647 .
factor(a):factor(b) 4 3.142 0.785 0.9638 0.43689
Residuals 44 35.859 0.815
As I am certainly misunderstanding something, I would appreciate a
hint, and maybe a literature recommendation!
Many thanks,
Ulf
P.S.: please CC: me, I'm not on the list at the moment! Thank you!
--
======================================================================
Ulf Mehlig <umehlig at zmt.uni-bremen.de>
Center for Tropical Marine Ecology/ZMT, Bremen, Germany
----------------------------------------------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list