Re: [R] AOV with repeated measures

From: Berton Gunter <>
Date: Thu 27 Oct 2005 - 08:27:32 EST

As you have not yet received an **authoritative** answer, I'll attempt a nonauthoritative one. Caveat emptor.

  1. If strain is a fixed effect and you have but one exemplar of each strain in species (which I assume is fixed) that is measured twice, measurement error is all you have and a straightforward specification:

aov(y~species + strain %in% species)

will do. It will also give a far too high false positive rate -- i.e. true significance is much lower than advertised because measurement error is only one small part of the true variability. You're missing the individual to individual within strain*species component (if this is meaningful in your context). In other words, the study design is flawed and the data analysis will be too.

2. If strain is random

aov(trait~species + Error(species/strain))

is what you need. The within,replicate error is automatically added.

Or even more simply: reduce the data to the average of the two measurements and simply run aov(trait~species) on that, a oneway anova. Even with a few missing replicates, this should be about right.

I would agree that documentation on the use of Error in aov seems essentially nonexistent (AFAIK). Section 10.2 of Mass4 by Venables and Ripley is about the best resource I know of. However, as the aov docs say, if you're really in case 2, you're probably better off doing this with lme() anyway. Partitioning SS is soooo 1960's when we have Doug Bates and friends noodling away writing sophisticated likelihood optimization code for us. Don't let his efforts be in vain, I say (or was that Abe? ...) .

"The business of the statistician is to catalyze the scientific learning process." - George E. P. Box    

> -----Original Message-----
> From:
> [] On Behalf Of
> Christian Landry
> Sent: Wednesday, October 26, 2005 12:10 PM
> To:
> Subject: [R] AOV with repeated measures
> Dear R user,
> I have a question on using R to analyze data with repeated
> measurements. I
> have 2 species with several strains (12) per species, each of
> which has
> been measured twice with for a given trait. No particular
> covariance, just
> two measures. Now I want to analyze the data with an ANOVA (aov)
> considering these repeated measures to get the MSq and SSq
> for the species
> and strain level. I would like to know how to write the ANOVA
> model in R. I
> have done the following:
> aov(trait ~ species + strain/replicate)
> Is it accurate?
> Thanks a lot,
> Christian
> ______________________________________________
> mailing list
> PLEASE do read the posting guide!
> mailing list PLEASE do read the posting guide! Received on Thu Oct 27 08:33:38 2005

This archive was generated by hypermail 2.1.8 : Thu 27 Oct 2005 - 09:32:56 EST