[R] aov() and lme() (repeated measures and ANOVA)

Christophe Pallier pallier at lscp.ehess.fr
Fri Oct 28 12:39:27 CEST 2005


Hello,


> Subject: [R] aov() and lme()
> From: Jan Wiener <jan.wiener at tuebingen.mpg.de>
> Date: Thu, 27 Oct 2005 13:14:59 +0200
> 
> Sorry for reposting, but even after extensive search I still did not 
> find any answers.
> 
> using: 
> summary(aov(pointErrorAbs~noOfSegments*turnAngle+Error(subj/(noOfSegments+turnAngle)), 
> data=anovaAllData ))
> 
> with subj being a random factor and noOfSegments and turnAngle being 
> fixed factors, I get the following results:
> 
> [...] 
> 
> No I trying to fit the same data with lme and using the following call:
> 
> anova(lme(fixed=pointErrorAbs~noOfSegments*turnAngle, random=~1|subj, 
> data=anovaAllData))
> 
> Unfortunately the results are 'really' different from the aov() 
> procedure (I guess I have the call wrong):
> 

Maybe the following post concerning repeated measures and ANOVA can help:

(from http://tolstoy.newcastle.edu.au/~rking/R/help/03b/7663.html)

 > $ anova(lme(DV ~ GROUP*TRIAL,random= ~1|SUB, correlation=corCompSymm() ))
 >
 >(TRIAL and GROUP are fixed factors)
 >
 >Actually, you do not need lme for to run a repeated measure anova.
 >You could use the aov function:
 >
 > $ summary(aov(DV~GROUP*TRIAL+Error(SUB/TRIAL)))
 >
 > ... yields the same results (when data are balanced)


Christophe Pallier
www.pallier.org




More information about the R-help mailing list