[R] Probability for ANOVA
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Tue Jan 27 16:20:13 CET 2004
Laurent Houdusse <l.houdusse at cerep.fr> writes:
> Hi all!
>
> I have 4 treatments on 5 animals
> Treat1 Treat2 Treat3 Treat4
> Animal1 36 37 35 39
> Animal2 33 34 36 37
> Animal3 37 35 33 38
> Animal4 34 36 34 35
> Animal5 35 36 33 36
>
> I use an Anova and i try to verify calcul
> So i retrieve:
> DF SS MS F P
> Between Groups 3 20.950 6.983 3.492
> Residual 16 32.000 2.000
> Total 19 52.950 2.787
>
> How can i calcul the p-Value? Is there a function to do this?
Yes:
> 1-pf(3.492,3,16)
[1] 0.04032243
However, this might not be the appropriate analysis if the animals are
the same across treatments (not that it matters much in this case):
> summary(aov(y ~ treat, data=dd))
Df Sum Sq Mean Sq F value Pr(>F)
treat 3 20.950 6.983 3.4917 0.04033 *
Residuals 16 32.000 2.000
---
Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
> summary(aov(y ~ treat+animal, data=dd))
Df Sum Sq Mean Sq F value Pr(>F)
treat 3 20.9500 6.9833 3.9343 0.03623 *
animal 4 10.7000 2.6750 1.5070 0.26146
Residuals 12 21.3000 1.7750
---
Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list