[R] lme newbie question

Lorenz.Gygax@fat.admin.ch Lorenz.Gygax at fat.admin.ch
Mon Jun 14 08:52:24 CEST 2004

Hi Christoph,

> Am I right in this lme implementation, when I want to investigate the
> influence of the age.group, and the two conditions on the rt:
> 	my.lme <- lme(rt ~ age.group + angles * hands, data = 
> my.data, random = ~ 1 |subject)
> then I think I would have to compare the model above with a more
> elaborated one, including more interactions:
> 	my.lme2 <- lme(rt ~ age.group * angles * hands, data = 
> my.data, random = ~ 1 |subject)
> and comparing them by performing a likelhood-ratio test, yes?

If you compare these two models, you test whether the interactions of
age.group with angles and hands and the three-way interaction all together
make for a significant improvement of the model. Is that what you want? Also
note: if you do this, you need to use the method ML and not the default
REML. Or you start with the second model, use anova (my.lme2) and reduce the
model stepwise.

You can also ask whether there is a subject to subject variability in
variables other than the intercept (i.e. interactions between your random
and the fixed variables) and e.g. try things like random = ~ age.group +
angles * hands | subject

> I think, if I would like to generalize the influence of the experimental
> conditions on the rt I should define angles and hands as a random effect,
> yes? 

I do not see exactly what you aim at, here. Possibly, the second part of my
answer above is an answer to this as well?

> thanks for a short feedback. It seems, repeated-measures 
> anova's aren't a trivial topic in R :)

They never are. But, after having read most of Pinheiro and Bates' book
'Mixed effects modelling in S and S-PLUS' (Springer), it seems easier to me
than ever, because they use a consistent, integrated and concise approach.

Regards, Lorenz
Lorenz Gygax, Dr. sc. nat.
Tel: +41 (0)52 368 33 84 / lorenz.gygax at fat.admin.ch      

Center for proper housing of ruminants and pigs
Swiss Veterinary Office
agroscope FAT Tänikon, CH-8356 Ettenhausen / Switzerland
Fax : +41 (0)52 365 11 90 / Tel: +41 (0)52 368 31 31

More information about the R-help mailing list