Ben,
I would like to test the sulfur on the clover field, nitrogen on the clover
field and then test for the presence of interaction.
Sorry about the last email, seems it really screwed itself over, here it is
again, hopefully nicer:
Nitrogen(0) Nitrogen(20)
Sulfur(0) 4.54 5.73
Sulfur(3) 4.64 7.05
Sulfur(6) 5.27 5.81
Sulfur(9) 5.81 6.30
Each of those is a cell mean of 3 values.
Would I simply do as follows?:
yield<- c(4.54,4.64,5.27,5.81,5.73,7.05,5.81,6.30)
sulfur <- c(1,2,3,4,1,2,3,4)
nitro <- c(1,1,1,1,2,2,2,2)
summary(aov(yield~sulfur*nitro))
Thanks, DM
----- Original Message ----
From: Ben Fairbank <BEN at SSANET.COM>
To: David Mackovjak <bejitto101 at yahoo.com>
Sent: Wednesday, March 19, 2008 3:14:36 PM
Subject: RE: [PS] [R] Two Way ANOVA
DM --
I think it would be helpful if you could also tell us what it is you are
hoping to find out from the analysis. For example, a statement such as
"I am seeking to find if there are any effects of the concentration (or
presence?) of nitrogen and/or sulfur on the (fill in your dependent
variable, such as 'cell division times' or 'changes in unbuffered
pH' or
whatever it is). That will help readers to see what design you need.
For example, do you want to look ONLY for an interaction, or do you want
to test for main effects of N and S also?
You might like to download Faraway's 2002 paper "Practical Regression
and Anova Using R" as start; google should find it for you.
Ben
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of David Mackovjak
Sent: Wednesday, March 19, 2008 5:02 PM
To: r-help at r-project.org
Subject: [PS] [R] Two Way ANOVA
First time using, the mailing list and I'm somewhat new to R, so excuse
me if I do anything wrong.
I was wondering how I would set up a two way ANOVA for the following
data:
Nitrogen
(0)
Nitrogen
(20)
(cell
means)
(cell
means)
[Sulfur means]
Sulfur (0)
4.48
5.76
4.52
(4.54)
5.64
(5.73)
[5.14]
4.63
5.78
Sulfur (3)
4.70
7.01
4.65
(4.64)
7.11
(7.05)
[5.84]
4.57
7.02
Sulfur (6)
5.21
5.88
5.23
(5.27)
5.82
(5.81)
[5.54]
5.38
5.73
Sulfur (9)
5.88
6.26
5.98
(5.81)
6.26
(6.30)
[6.11]
5.91
6.37
[Nitrogen means]
[5.10]
[6.22]
Source ofVariation SS
Sulfur 3.15
Nitrogen 7.59
Sulfur x Nitrogen 3.84
Error 0.08
Total 14.66
>From googling I know I want to get it to the form:
> fit <- aov(y ~ A*B, data=mydataframe)
But what would I set for A, B and y?
________________________________________________________________________
____________
Looking for last minute shopping deals?
______________________________________________
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.
____________________________________________________________________________________
Be a better friend, newshound, and