[R-sig-ME] lme constrasts for interaction effects group*time and group it self

R.S. Cotter cotter.rs at gmail.com
Thu Jul 8 09:44:13 CEST 2010


Hello,

I have a question regarding lme ().

First little bit background, the question is stated below.

I want to test the effect of Time on response Y, and whether this effect
differs between Group (A, B, C)

Package: lme(nlme)

Test1<-lme(Y ~ Group*Time,random=~1|ID)

To test for differences between groups reagding the effect of time:

options( contrasts = c("contr.treatment", "contr.poly"))
anova(Test1, L = c("GroupA:Time"=1,"GroupC:Time"=-1))

Let us say that the interaction "Group*Time" is significant and that Group B
and C are significant steeper than A. To illustrate I've made a figure with
different slopes (calculated from lme () parameter estimates) for the effect
of Time on the response Y for the different Groups (A, B, C).

My question:

I'm mainly interested to test for test the effect of Time on response Y, and
whether this effect differs between Group (A, B, C). And that worked well by
using "options( contrasts = c("contr.treatment", "contr.poly"))".
*However, from
the figure (attached), the slope C is far below A and B, is it possible to
test this?*
**
Regards Cotter


More information about the R-sig-mixed-models mailing list