Tanks are the experimental unit, fishes within tanks are repeated measures of the treatment, there is no "nesting" of replicates. You can analyze the 45 x 50 individual data values by repeated measures (mixed effects models) or by summarizing the 50 measurements per tank=treatment into a single value and then doing exactly what Indrajit said with the 45 summarized values.
-- Bert On Mon, Sep 26, 2011 at 10:27 PM, Austin Paul <austi...@usc.edu> wrote: > Hi, > > Yes. As I explained, the three male and three female types were crossed in > all combinations (9 ways). For each of the 9 types, I have *5 replicate > tanks* (45 total tanks). And from each of the 45 tanks I have 50 > observations for size. So the 5 replicates are somehow nested within the > two-way interaction? If there was just 1 tank for each of the 9 crosses, > yes, it would be very easy to code the two-way anova. It may still be very > easy, but I'm not quite sure how to account for the replicate tanks. > > Hope this makes more sense. > > Austin > > > > On Mon, Sep 26, 2011 at 10:21 PM, Indrajit Sengupta < > indra_cali...@yahoo.com > > wrote: > > > Can you explain what do you mean by "5 replicate tanks"? > > > > Doing a two way anova is very simple in R. You would need to fit a linear > > model (lm function). > > > > Eg.: > > > > > model <- lm(y ~ male + female + male:female, data =) > > > > > > Regards, > > Indrajit > > > > > > ------------------------------ > > *From:* Austin Paul <austi...@usc.edu> > > *To:* r-help@r-project.org > > *Sent:* Tuesday, September 27, 2011 6:13 AM > > *Subject:* [R] two-way anova help > > > > Hello, > > > > I am having some trouble coding a two-way anova due to replicated > > treatments. > > > > I have a factorial design with three male parents and three female > parents. > > They were mated in all combinations and their babies were grown out and > > measured for size. 50 babies were measured for each of the 9 crosses. > If > > I > > stopped here, I would have no troubles. But I also have 5 replicate > tanks > > for each of the 9 crosses. My question is how to I code in the 5 > replicate > > tanks per treatment? > > > > Thanks, > > Austin > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-help@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. > > > > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@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 [[alternative HTML version deleted]] ______________________________________________ R-help@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.