[R-sig-ME] help

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Wed Oct 19 11:00:16 CEST 2011


Dear Matthew,

It always helps if you give us your attempt of the code. That allows us to point you at the problem.

The lme() syntax is somewhat different from the lmer() syntax.

lme(trans ~ time * A, random = ~time|studyid, correlation = corAR1(form = ~ Time))

Best regards,

Thierry

PS storing an lmer() model in an object called lmer is not a good idea.

> -----Oorspronkelijk bericht-----
> Van: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-
> bounces at r-project.org] Namens Matthew Boden
> Verzonden: dinsdag 18 oktober 2011 19:08
> Aan: R-sig-mixed-models at r-project.org
> Onderwerp: [R-sig-ME] help
> 
> I am new to R and mixed modeling. I would appreciate help with the following
> analysis.
> 
> I am having trouble identifying the sytax needed to fit a longitudinal mixed
> model using an auto-regressive (AR1) covariance matrix using library nlme.
> 
> In R commander, I have had no problem fitting a longitudinal mixed model with
> an unstructured covariance matrix using library lme4 with the following syntax.
> 
> lmer <- lmer(trans ~ time + A + A:time + (time | studyid), data = long)
> summary(lmer)
> cftest (lmer)
> 
> DV = trans (measured at 4 time-points)
> IV = time, A (time-variant individual difference variable, measured at 4
> time-points)
> 
> Can anyone tell me the syntax needed to fit an AR1 covariance matrix?
> 
> Thanks.
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models




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