Re: [R] Within-subject factors in lme

From: Thilo Kellermann <tkellermann_at_ukaachen.de>
Date: Fri 12 Jan 2007 - 15:42:25 GMT

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@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@ukaachen.de

______________________________________________
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:57:50 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 - 18:30:25 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.