> Thanks for your suggestion. I guess the model you are fitting here
> has only a single random effect term, namely subject. If the effect
> of A depends on S, one needs to include an additional random effects
> term for the S:A interaction.

It is not quite clear what you are after, but the 'if' sounds as you would like 
to include interactions between your fixed and random effects? This is done in 
the following way:

lme (y ~ A + B, random= ~ A | S )
or
lme (y ~ A + B, random= ~ B | S )
or
lme (y ~ A + B, random= ~ A + B | S )

with redard to discussions on degrees of freedom (and thus testing in 
mixed-effects models) you may also want to refer to:

I hope this helps.
Regards, Lorenz Gygax
- 
Swiss Federal Veterinary Office
Centre for proper housing of ruminants and pigs
Agroscope Reckenholz-Tänikon Research Station ART

______________________________________________
[email protected] 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.

Reply via email to