[R-sig-ME] Contrasts with nlme
ken.knoblauch at inserm.fr
Wed Nov 11 19:10:07 CET 2009
Douglas Bates <bates at ...> writes:
> I think you will need to check with the author of the contrast package
> regarding this error. It is entirely possible that the methods in the
> package do not accept lme models.
> On Tue, Nov 10, 2009 at 2:11 PM, Jacques Ropers <jropers at ...> wrote:
> > 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.
The vignette with the package contains an example
for an lme object, however, which is in no way
incompatible with the advice at the top.
> > Thanks for your help.
> > Jacques
Stem-cell and Brain Research Institute
Department of Integrative Neurosciences
18 avenue du Doyen Lépine
tel: +33 (0)4 72 91 34 77
fax: +33 (0)4 72 91 34 61
portable: +33 (0)6 84 10 64 10
More information about the R-sig-mixed-models