[R] Nested ANOVA models in R

Daniel Bolnick danbolnick at mail.utexas.edu
Wed Feb 6 05:28:22 CET 2008


Hi,

I'm trying to work through a Nested ANOVA for the following scenario: 
20 males were used to fertilize eggs of 4 females per male, so that 
female is nested within male (80 females used total). Spine length 
was measured on 11 offspring per family, resulting in 880 
measurements on 80 families.

I used the following two commands:

summary(aov(Spinelength ~ Male*Female))

and
summary(aov(Spinelength ~ Male/Female))

I get the same mean squares either way, which doesn't seem right to 
me. In the former case, the mean square for females should be 
calculated around the overall mean across all females, whereas the 
mean square in the latter case should be calculated using deviations 
from the set of 4 females nested within a given male, right?

Of course, it is more appropriate for me to treat each of these as 
random effects. I know Bates has objections to the SAS-style 
partitioning variances to obtain F statistics and p-values, and I 
have read relevant parts of Pinhero and Bates, but how can a specify 
a nested random effects model that yields p-values for both the males 
(tested against MS for females) and females nested within males?

Thanks,

Dan Bolnick
Section of Integrative Biology
University of Texas at Austin



More information about the R-help mailing list