1
$\begingroup$

You can further improve a linear mixed model with random intercept and slope by specifying a structure in the residuals (for example AR(1)).

In SAS it is possible, but I hope this is also already possible in R. Does somebody knows how to do this?

I am using both packages lme4 and nlme.

Thank you, Kasper

$\endgroup$
1
  • 1
    $\begingroup$ It is possible in nlme. Check the use of ?corARMA. $\endgroup$
    – usεr11852
    Apr 3, 2014 at 18:11

1 Answer 1

0
$\begingroup$

After going through the book "Linear mixed effect models using R" by the authors Andrezej Galecki and Tomasz Burzykowski, I could not find a way to do it in R.

However, one example in the book Applied "Longitudinal Data Analysis" by Fitzmaurice, Laird and Ware apply this methodology, and on their website, they give the R code:

model2 <- lme(pbf ~ time + time0, random= ~ 1 | id, + corr=corCAR1(, form= ~ time | id))

The full script you can find on:

http://www.hsph.harvard.edu/fitzmaur/ala2e/

$\endgroup$
1
  • 1
    $\begingroup$ I would say the canonical reference on the nlme package is Pinheiro & Bates (2000). They are, after all, the authors of that package. And in that book, they give plenty of examples illustrating the use residual correlation structures. $\endgroup$
    – Wolfgang
    Apr 3, 2014 at 21:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.