[R] Within-subject factors in lme
Thilo Kellermann
tkellermann at ukaachen.de
Fri Jan 12 16:42:25 CET 2007
Dear Kim,
as far as I understandyour problem correct the specification of the model in
lme is:
lme( fixed=y ~ A*B, random=~1|S)
Thilo
On Friday 12 January 2007 15:54, Kim Mouridsen wrote:
> 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.
> Kim.
>
> ______________________________________________
> R-help at 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.
--
________________________
Thilo Kellermann
Department of Psychiatry und Psychotherapy
RWTH Aachen University
Pauwelstr. 30
52074 Aachen
Tel.: +49 (0)241 / 8089977
Fax.: +49 (0)241 / 8082401
E-Mail: tkellermann at ukaachen.de
More information about the R-help
mailing list