Pibil
Pibil

Reputation: 11

R: Mixed effects model with autocorrelated errors in nlme Package: How do I check model the ARMA assumptions?

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?

Upvotes: 1

Views: 566

Answers (1)

Zheyuan Li
Zheyuan Li

Reputation: 73325

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.

Upvotes: 3

Related Questions