# 14.4 - Examples of Applying Cochrane-Orcutt Procedure

### Example 1: Employee Data

The next data set gives the number of employees (in thousands) for a metal fabricator and one of their primary vendors for each month over a 5-year period, so *n* = 60 (employee.txt). A simple linear regression analysis was implemented:

\[\begin{equation*} y_{t}=\beta_{0}+\beta_{1}x_{t}+\epsilon_{t}, \end{equation*}\]

where \(y_{t}\) and \(x_{t}\) are the number of employees during time period *t* at the metal fabricator and vendor, respectively.

A plot of the number of employees at the fabricator versus the number of employees at the vendor with the ordinary least squares regression line overlaid is given below in plot (a). A scatterplot of the residuals versus t (the time ordering) is given in plot (b).

Notice the non-random trend suggestive of autocorrelated errors in the scatterplot. The estimated equation is \(y_{t}=2.85+0.12244x_{t}+e_{t}\), which is given in the following summary output:

The plot below gives the PACF plot of the residuals, which helps us decide the lag values. (Minitab: Store the residuals from the regression model fit then select Stat > Time Series > Partial Autocorrelation and use the stored residuals as the "Series.")

In particular, it looks there is a lag of 1 since the lag-1 partial autocorrelation is so large and way beyond the "5% significance limits" shown by the red lines. (The partial autocorrelations at lags 8, 11, and 13 are only slightly beyond the limits and would lead to an overly complex model at this stage of the analysis.) We can also obtain the output from the Durbin-Watson test for serial correlation (Minitab: click the "Results" button in the Regression Dialog and check "Durbin-Watson statistic."):

To find the p-value for this test statistic we need to look up a Durbin-Watson critical values table, which in this case indicates a highly significant *p-*value of approximately 0. (In general Durbin-Watson statistics close to 0 suggest significant positive autocorrelation.) A lag of 1 appears appropriate.

Since we decide upon using AR(1) errors, we will have to use one of the procedures we discussed earlier. In particular, we will use the Cochrane-Orcutt procedure. Start by fitting a simple linear regression model with response variable equal to the residuals from the model above and predictor variable equal to the lag-1 residuals and no intercept to obtain the slope estimate, *r* = 0.831385.

Now, transform to \(y_{t}^{*}=y_{t}-ry_{t-1}\) and \(x_{t}^{*}=x_{t}-rx_{t-1}\). Perform a simple linear regression of \(y_{t}^{*}\) on \(x_{t}^{*}\). The resulting regression estimates from the Cochrane-Orcutt procedure are:

\[\begin{align*} \hat{\beta}_{1}^{*}&=0.0479=\hat{\beta}_{1} \\ \hat{\beta}_{0}^{*}&=4.876\Rightarrow\hat{\beta}_{0}=\frac{4.876}{1-0.831385}=28.918. \end{align*}\]

The corresponding standard errors are:

\[\begin{align*} \mbox{s.e.}(\hat{\beta}_{1}^{*})&=0.0130=\mbox{s.e.}(\hat{\beta}_{1})\\ \mbox{s.e.}(\hat{\beta}_{0}^{*})&=0.787\Rightarrow\mbox{s.e.}(\hat{\beta}_{0})=\frac{0.787}{1-0.831385}=4.667. \end{align*}\]

Notice that the correct standard errors (from the Cochrane-Orcutt procedure) are larger than the incorrect values from the simple linear regression on the original data. If ordinary least squares estimation is used when the errors are autocorrelated, the standard errors often are underestimated. It is also important to note that this does not always happen. Underestimation of the standard errors is an "on average" tendency over all problems.

### Example 2: Oil Data

The data are from U.S. oil and gas price index values for 82 months (dataset no longer available). There is a strong linear pattern for the relationship between the two variables, as can be seen below.

We start the analysis by doing a simple linear regression. Minitab results for this analysis are given below.

The residuals in time order show a dependent pattern (see the plot below).

The slow cyclical pattern that we see happens because there is a tendency for residuals to keep the same algebraic sign for several consecutive months. We also used *Stat >> Time Series >> Lag* to create a column of the lag 1 residuals. The correlation coefficient between the residuals and the lagged residuals is calculated to be 0.829 (and is calculated using *Stat >> Basic Stats >> Correlation*, which can be seen in the bottom of the figure above).

So, the overall analysis strategy in presence of autocorrelated errors is as follows:

- Do an ordinary regression. Identify the difficulty in the model (autocorrelated errors).
- Using the stored residuals from the linear regression, use regression to estimate the model for the errors, ε
_{t}= ρε_{t-1}+*u*where the_{t}*u*are_{t }*iid*with mean 0 and variance σ^{2}. - Adjust the parameter estimates and their standard errors from the original regression.

#### A Method for Adjusting the Original Parameter Estimates (Cochrane-Orcutt Method)

- Let \(\hat{\rho}\) = estimated lag 1 autocorrelation in the residuals from the ordinary regression (in the U.S. oil example, \(\hat{\rho} = 0.829\)).
- Let
*y*=^{*}_{t}*y*− \(\hat{\rho}\)_{t}*y*_{t-}_{1}. This will be used as a response variable. - Let
*x*=^{*}_{t}*x*− \(\hat{\rho}\)_{t}*x*_{t-}_{1}. This will be used as a predictor variable. - Do an “ordinary” regression between
*y*and^{*}_{t}*x*. This model should have time independent residuals.^{*}_{t} - The sample slope from the regression directly estimates
*β*_{1}, the slope of the relationship between the original*y*and*x*. - The correct estimate of the intercept for the original model
*y*versus*x*relationship is calculated as \(\beta_0=\hat{\beta}_0^* / (1-\hat{\rho})\) , where \(\hat{\beta}_0\) is the sample intercept obtained from the regression done with the modified variables.

Returning to the U.S. oil data, the value of \(\hat{\rho}\) = 0.829 and the modified variables are **ynew **= *y _{t}* −0.829

*y*

_{t-}_{1}and

**xnew**=

*x*−0.829

_{t}*x*

_{t-}_{1}. The regression results are given below.

#### Parameter Estimates for the Original Model

Our real goal is to estimate the original model *y _{t}* =

*β*

_{0}+

*β*

_{1}

*x*+ ε

_{t}_{t}. The estimates come from the results just given.

\(\hat{\beta}_1=1.08073\)

\(\hat{\beta}_0=\frac{-1.412}{1-0.829}=-8.2573\)

These estimates give the sample regression model:

*y _{t}* = −8.257 + 1.08073

*x*+ ε

_{t}_{t},

with ε_{t} = 0.829ε_{t-1} + *u _{t}* , where

*u*’s are

_{t}*iid*with mean 0 and variance σ

^{2}.

#### Correct Standard Errors for the Coefficients

- The correct standard error for the slope is taken directly from the regression with the modified variables.
- The correct standard error for the intercept is \(\text{s.e.}\hat{\beta}_0=\frac{\text{s.e.}\hat{\beta}_0^*}{1-\hat{\rho}}\).

Correct and incorrect estimates for the coefficients:

Coefficient | Correct Estimate | Correct Standard Error |
---|---|---|

Intercept | −1.412 / (1−0.829) = −8.2573 | 2.529 / (1−0.829) = 14.79 |

Slope | 1.08073 | 0.05960 |

Incorrect Estimate | Incorrect Standard Error | |

Intercept | -31.349 | 5.219 |

Slope | 1.17677 | 0.02305 |

This table compares the correct standard errors to the incorrect estimates based on the ordinary regression. The “correct” estimates come from the work done in this section of the notes. The incorrect estimates are from the original regression estimates reported above. Notice that the correct standard errors are larger than the incorrect values here. If ordinary least squares estimation is used when the errors are autocorrelated, the standard errors often are underestimated. It is also important to note that this does not always happen. Overestimation of the standard errors is an “on average” tendency over all problems.

#### Forecasting Issues

When calculating forecasts for time series, it is important to utilize ε_{t} = ρε_{t-1} + *u _{t}* as part of the process. In the U.S. oil example,

\(F_t=\hat{y}_t\) +* e*_{t} = −8.257 + 1.08073*x _{t}* +

*e*

_{t}= −8.257 + 1.08073

*x*+ 0.829

_{t}*e*

_{t-1}.

Values of \(F_t\) are computed iteratively:

- Compute \(\hat{y}_1= −8.257 + 1.08073x_1\) and \(e_1=y_1-\hat{y}_1\).
- Compute \(\hat{y}_2= −8.257 + 1.08073x_2\) and use the value of \(e_1\) when computing \(F_2 = \hat{y}_2 + 0.829e_1\).
- Determine \(e_2=y_2-\hat{y}_2\).
- Compute \(\hat{y}_3= −8.257 + 1.08073x_3\) and use the value of \(e_2\) when computing \(F_3 = \hat{y}_3 + 0.829e_2\).
- Iterate.