[R] Covariates in LME

Aberg Carl kristoffer.aberg at epfl.ch
Thu Mar 27 13:05:25 CET 2008


Hi,
Im using lme to calculate a mixed factors ANOVA according to:

px_anova = anova(lme(dep~music*time*group, random = ~1|id, data = px_data))

where

dep is a threshold,
time is a repeated measures variable (2 levels)
group is a between subjects variable (2 levels)
id is a random factor (subject id)
music is a between subjects variable (2 levels) indicating if a person has a musical experience, or not

Musical experience is now decided by categorizing depending on the number of years practicing playing an instrument.

I would like to use the years of playing an instrument as a covariate instead of creating categories.

How can I do this in a simple way?

Thanks and have a nice day!

Kristoffer



More information about the R-help mailing list