[R] lme and aov

Gang Chen gangchen at mail.nih.gov
Fri Aug 3 20:32:59 CEST 2007


I have a mixed balanced ANOVA design with a between-subject factor  
(Grp) and a within-subject factor (Rsp). When I tried the following  
two commands which I thought are equivalent,

 > fit.lme <- lme(Beta ~ Grp*Rsp, random = ~1|Subj, Model);
 > fit.aov <- aov(Beta ~ Rsp*Grp+Error(Subj/Rsp)+Grp, Model);
	
I got totally different results. What did I do wrong?

Thanks,
Gang



More information about the R-help mailing list