# Residual structure in Linear Mixed Models with Random effects

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

• It is possible in nlme. Check the use of ?corARMA. Apr 3 '14 at 18:11

• 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. Apr 3 '14 at 21:25