[R] Within-subject factors in lme

From: Kim Mouridsen <kim.mouridsen_at_gmail.com>
Date: Fri 12 Jan 2007 - 14:54:49 GMT

Dear R-users

I'm considering a repeated measures experiment where two within-subject factors A (2 levels) and B (3 levels) have been measured for each of 14 subjects, S. I wish to test the effect of factor A. I know that a variance component model with random effects S, S:A, S:B and S:A:B can be fitted using aov:

aov( y ~ A*B + Error(S/(A*B)) )

If there is no significant interaction, the test for the effect of A is carried out in the S:A error strata.

How can a test for the effect of A be performed using lme from the nlme package?

( lme( y ~ A*B, random=~1|S/(A*B)) is apparently not correct )

Thanks in advance for your advice.

R-help@stat.math.ethz.ch 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. Received on Sat Jan 13 02:04:31 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 12 Jan 2007 - 16:30:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.