[R] how to read the "Sum Sq" - column from summary.aov()
Bertolt Meyer
bmeyer at sozpsy.uzh.ch
Thu Feb 3 13:30:23 CET 2011
Dear R-Users,
I have a trivial problem, but extensive googling and ??'ing did not solve it: I want to obtain the sums of squares from a summary.aov() object for later use. Example:
> DV <- rnorm(100)
> IV1 <- as.factor(rep(c("male", "female"), times = 50))
> IV2 <- as.factor(rep(c("young", "old"), times = 50))
>
> summary(aov(DV ~ IV1 * IV2))
Df Sum Sq Mean Sq F value Pr(>F)
IV1 1 0.215 0.21499 0.2277 0.6343
Residuals 98 92.523 0.94411
How can I store the sums of squares in a variable for later use? Like this:
>some.magic.command()
[1] 0.215 92.523
Thank you,
Bertolt
--
Dr. Bertolt Meyer
Senior research and teaching associate
Social Psychology, Institute of Psychology, University of Zurich
Binzmuehlestrasse 14, Box 15
CH-8050 Zurich
Switzerland
bmeyer at sozpsy.uzh.ch
More information about the R-help
mailing list