# Dealing with autocorrelation using Generalized Least Squares

I have a time series data set where the auto correlation of the residuals follow an exponential decay. I was wondering how I should deal with this? I would like to fit a linear model and have tried using the gls function with the AR1 input. However The AIC is MUCH larger than the original model.

• I haven't checked, but I am confident that the discrepancy does not stem from a substantial difference being measured by AIC, but rather from different ways the two formula compute the AIC. For example, when all models being compared share the same number of observations $T$, it is OK not to divide certain parts of the AIC formula by $T$. – Christoph Hanck Dec 10 '18 at 10:40