Correcting for Autocorrelation in the residuals using the Cochran-Orcut Method

Using Stata to do it by hand

While it is easy to substitute the prais command and get Stata to automatically correct for serial correlation, it is quite instructive to actually work through an iterative process one by hand to get a feel for what the procedure is really doing.

The basic steps in the iterative method are :

  1. Run the initial model with OLS
  2. Examine for serial correlation
  3. Calculate an esimate for rho (p)
  4. Create a set of corrected Xs and Ys
  5. Reestimate the model using the corrected Xs and Ys
  6. Calculate a new estimate of rho

For this example we will use the presidential approval data set: presapp.dta. Remember that the Stata data set needs to be made a Time Series data set.



Run the initial model with OLS

Regress Presidential approval on real GNP

reg approval realgnp


Examine for serial correlation

After running the regression, type the Durbin-Watson Statistic command.

dwstat

Create a set of corrected Xs and Ys


Reestimate the model using the corrected Xs and Ys

Calculate a new estimate of rho