>
> ------------------------------
>
> Message: 2
> Date: Tue, 10 Nov 2009 21:11:41 +0100
> From: Jacques Ropers <jropers@gmail.com>
> Subject: [R-sig-ME] Contrasts with nlme
> To: R-sig-mixed-models@r-project.org
> Message-ID: <4AF9C8FD.8020808@gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Dear All,
>
> I'm modelling some longitudinal data (1 continuous
> response variable measured at 6 times (covariate time taken as factor),
> 1 continuous baseline, one "treatment" variable also taken as a factor)
> collected in the same subjects using the following model:
>
>
> model.lme<- lme(response ~ V0+ time + tt + tt:time, random =
> ~1|subject,correlation = corSymm(form = ~ 1 | subject),
> na.action=na.omit, data=total)
>
> Then I would lke to estimate the effect of "treatment" at time = 6 using
> the package "contrast"
>
> library(contrast)
> contrast(model.lme ,
> a = list(tt="1",time="6"),
> b = list(tt="0",time="6")
> )
>
> But I get the following error message
> "Erreur dans gendata.default(fit = list(modelStruct = list(reStruct =
> list(:   not enough factors"
>
> I'm obviously doing something wrong.
>
> Thanks for your help.
>
> Jacques
>
>
>
Dear Jacques,

I'm guessing you can do what you want to do here with the contrast library,
although I haven't used it (yet).

I believe you could estimate the effect of "treatment" at time = 6 by using
the relevel function and relevel at time 6. Then, the estimate for the
intercept would the estimate at time=6.
E.g., (your data frame is named total right?)

total$time=relevel(total$time,ref="6")

and then refit your model.

Cheers,

Antoine


>
> ------------------------------
>
> _______________________________________________
> R-sig-mixed-models mailing list
> R-sig-mixed-models@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>
> End of R-sig-mixed-models Digest, Vol 35, Issue 9
> *************************************************
>



-- 
Antoine Tremblay
Department of Neuroscience
Georgetown University
Washington DC

	[[alternative HTML version deleted]]


