1

I am setting up a LME model with the following structure in R, using the package nlme:

model <- lme(y ~ x, random = ~ 1 | group, data = data, correlation = corARMA(form = ~ x | group, p=1, q=1)

Comparing AIC values, this model seems to compare better to a model without autocorrelated residuals. But how do I check my model assumptions regarding the ARMA model? Most importantly, how do I check whether the residuals of ARMA model are not correlated anymore?

Pibil
  • 11
  • 1

1 Answers1

2

You need to check out if there is auto-correlation in standardized/normalized residuals.

acf(residuals(model, type = "normalized"))

Ideally it should look like white noise.

Zheyuan Li
  • 71,365
  • 17
  • 180
  • 248
  • 1
    Thanks for answering, this is an underappreciated point (it's mentioned in passing [here](https://stackoverflow.com/questions/49796175/how-to-check-and-control-for-autocorrelation-in-a-mixed-effect-model-of-longitud) and [here](https://ms.mcmaster.ca/~bolker/R/misc/foxchapter/bolker_chap.html) (search for "normalized"). The answer would be improved, I think, with a quote from `?nlme::residuals.lme` explaining what this option means ... – Ben Bolker Jun 16 '22 at 23:03