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

Douglas Bates bates at stat.wisc.edu
Thu Jul 8 15:01:02 CEST 2010


On Thu, Jul 8, 2010 at 2:44 AM, R.S. Cotter <cotter.rs at gmail.com> wrote:
> 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?*
> **

The figure wasn't enclosed with my copy at least.




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