[R] anova p value extraction
Paul Benton
hpbenton at scripps.edu
Thu May 8 02:47:03 CEST 2008
hello all,
Quick question, how do I get the p value out of the anova?
Thanks,
Paul
> pb<-aov(as.numeric(diff[5,16:33]) ~ grF)
> summary(pb)
Df Sum Sq Mean Sq F value Pr(>F)
grF 3 2.7860e+10 9.2867e+09 4.2236 0.02534 *
Residuals 14 3.0783e+10 2.1988e+09
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> str(summary(pb))
List of 1
$ :Classes 'anova' and 'data.frame': 2 obs. of 5 variables:
..$ Df : num [1:2] 3 14
..$ Sum Sq : num [1:2] 2.79e+10 3.08e+10
..$ Mean Sq: num [1:2] 9.29e+09 2.20e+09
..$ F value: num [1:2] 4.22 NA
..$ Pr(>F) : num [1:2] 0.0253 NA
- attr(*, "class")= chr [1:2] "summary.aov" "listof"
> attr(summary(pb), "Pr(>F)")
NULL
More information about the R-help
mailing list