When you do an OLS regression and plot the resulting residuals, how can you tell if the residuals are autocorrelated? I know there are tests for this (Durbin, Breusch-Godfrey) but I was wondering if you can just look at a plot to gauge if autocorrelation could be a problem (because for heteroskedasticity it is fairly easy to do so).
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
migrated from math.stackexchange.com Feb 17 '13 at 0:39
This question came from our site for people studying math at any level and professionals in related fields.
Not only can you look at a plot, I think it's generally a better option. Hypothesis testing in this situation answers the wrong question.
The usual plot to look at would be an autocorrelation function (ACF) of residuals.
The autocorrelation function is the correlation of the residuals (as a time series) with its own lags.
Here, for example, is the ACF of residuals from a small example from Montgomery et al
Some of the sample correlations (for example at lags 1,2 and 8) are not particularly small (and so may substantively affect things), but they also can't be told from the effect of noise (the sample is very small).
Edit: Here's a plot to illustrate the difference between an uncorrelated and a highly correlated series (in fact, a nonstationary one)
The upper plot is white noise (independent). The lower one is a random walk (whose differences are the original series) - it has very strong autocorrelation.
It's not unusual if 5% or less of the autocorrelation values fall outside the intervals as that could be due to sampling variation. One practice is to produce autocorrelation plot for first 20 values and check whether more than one value falls outside the allowed intervals.