burak pekin
2008-Mar-26 08:49 UTC
[R] adjusted means and adjusted standard errors after ANOVA
I am trying to obtain adjusted means and standard errors for a three way ANOVA I have three effects, two continuous; fire frequency and annual precipitation, and one categorical; soil type in an unbalanced design. I am testing the effect of annual precipition (AP), soil type (ST), and fire frequency (FF) on stem count (SCt) My data table looks as such: ST FF AP SCt 3 Coy 4 888 312 4 Coy 3 911 185 6 Coy 3 937 136 7 Coy 5 1011 42 8 Coy 4 1015 138 9 Cop 4 950 290 11 Cop 4 951 252 16 Coy 4 988 124 17 Coy 5 988 118 20 Coy 5 1000 242 24 Cop 3 901 220 25 Cop 2 929 238 26 Cop 2 954 133 27 Cop 1 934 180 28 Cop 1 938 119 30 Cop 2 918 195 My R output for a 3 way ANOVA is as such:> SCt.aov = aov (SCt ~ AP + ST + FF, data)> summary ( SCt.aov )Df Sum Sq Mean Sq F value Pr(>F) AP 1 23696 23696 8.4237 0.01327 * ST 1 313 313 0.1114 0.74429 FF 1 21532 21532 7.6544 0.01707 * Residuals 12 33757 2813 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1>I would like to present my data so that it shows the significance of the p value for FF after the variability of AP and ST have been taken out, so I will need R to output the adjusted means and standard errors. This I do not know how to do. What is the easiest way to do this in R from this analysis? Kind regards, Burak Pekin Burak Pekin Ecosystem Research Group School of Plant Biology (M090) University of Western Australia 35 Stirling Highway Crawley, WA 6009 Australia Ph: +61 08 6488 7923 Fax: +61 08 6488 1001 [[alternative HTML version deleted]]
John Fox
2008-Mar-26 15:14 UTC
[R] adjusted means and adjusted standard errors after ANOVA
Dear Burak, Since two of the explanatory variables are quantitative, it is unusual to call this a three-way ANOVA (as opposed to a dummy-variable regression or analysis of covariance). I'd also think about fitting the model with lm() rather than aov(), so that you can more easily see the regression coefficients, and about whether you really want F-tests based on sequential sums of squares. In any event, you can get adjusted means and their standard errors from the effects package. I hope this helps, John -------------------------------- John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario, Canada L8S 4M4 905-525-9140x23604 http://socserv.mcmaster.ca/jfox> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of burak pekin > Sent: March-26-08 4:50 AM > To: r-help at r-project.org > Subject: [R] adjusted means and adjusted standard errors after ANOVA > > I am trying to obtain adjusted means and standard errors for a three > way > ANOVA > > > > I have three effects, two continuous; fire frequency and annual > precipitation, and one categorical; soil type in an unbalanced design. > > > > I am testing the effect of annual precipition (AP), soil type (ST), and > fire > frequency (FF) on stem count (SCt) > > > > My data table looks as such: > > > > > > > ST > > FF > > AP > > SCt > > > 3 > > Coy > > 4 > > 888 > > 312 > > > 4 > > Coy > > 3 > > 911 > > 185 > > > 6 > > Coy > > 3 > > 937 > > 136 > > > 7 > > Coy > > 5 > > 1011 > > 42 > > > 8 > > Coy > > 4 > > 1015 > > 138 > > > 9 > > Cop > > 4 > > 950 > > 290 > > > 11 > > Cop > > 4 > > 951 > > 252 > > > 16 > > Coy > > 4 > > 988 > > 124 > > > 17 > > Coy > > 5 > > 988 > > 118 > > > 20 > > Coy > > 5 > > 1000 > > 242 > > > 24 > > Cop > > 3 > > 901 > > 220 > > > 25 > > Cop > > 2 > > 929 > > 238 > > > 26 > > Cop > > 2 > > 954 > > 133 > > > 27 > > Cop > > 1 > > 934 > > 180 > > > 28 > > Cop > > 1 > > 938 > > 119 > > > 30 > > Cop > > 2 > > 918 > > 195 > > > > My R output for a 3 way ANOVA is as such: > > > > > SCt.aov = aov (SCt ~ AP + ST + FF, data) > > > summary ( SCt.aov ) > > > > Df Sum Sq Mean Sq F value Pr(>F) > > AP 1 23696 23696 8.4237 0.01327 * > > ST 1 313 313 0.1114 0.74429 > > FF 1 21532 21532 7.6544 0.01707 * > > Residuals 12 33757 2813 > > --- > > Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > > > > > > I would like to present my data so that it shows the significance of > the p > value for FF after the variability of AP and ST have been taken out, so > I > will need R to output the adjusted means and standard errors. This I do > not > know how to do. What is the easiest way to do this in R from this > analysis? > > > > Kind regards, > > Burak Pekin > > > > > > Burak Pekin > > Ecosystem Research Group > > School of Plant Biology (M090) > > University of Western Australia > > 35 Stirling Highway > Crawley, WA 6009 Australia > Ph: +61 08 6488 7923 > Fax: +61 08 6488 1001 > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org 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.