Lesson M09.L03: Correcting for Serial Correlation
| Field | Detail |
|---|---|
| Module | M09 — Serial Correlation and Time Series Inference |
| Level | Graduate (ECMT5001 S1 2027) |
| Duration | 35 min |
| Learning Objective | Apply HAC standard errors and feasible GLS to obtain valid inference when serial correlation is present; understand when each approach is appropriate and what each changes |
| Provenance | Wooldridge, Introductory Econometrics, Ch 12.3 |
Explanation
Once serial correlation is detected, two broad remedies exist:
- Keep OLS, fix the standard errors → HAC (Newey-West)
- Change the estimator → GLS / feasible GLS (Cochrane-Orcutt, Prais-Winsten)
1. HAC (Newey-West) Standard Errors
HAC stands for Heteroskedasticity and Autocorrelation Consistent. It corrects OLS standard errors for both heteroskedasticity and serial correlation simultaneously, analogous to White (robust) standard errors in cross-section settings.
Key property: HAC SEs adjust the variance-covariance matrix of \(\hat{\boldsymbol{\beta}}^{\text{OLS}}\) without changing the point estimates.
The HAC estimator replaces the usual \(\hat{\sigma}^2(\mathbf{X}'\mathbf{X})^{-1}\) with a sandwich estimator:
where \(\hat{\mathbf{S}}\) is the Newey-West long-run variance estimator that uses a kernel to weight autocovariances of the score:
with \(\hat{\Gamma}_j = \frac{1}{n}\sum_{t=j+1}^{n} \hat{u}_t \hat{u}_{t-j} \mathbf{x}_t \mathbf{x}_{t-j}'\) and Bartlett kernel weights \(w_j = 1 - j/(L+1)\).
Bandwidth choice: The lag truncation \(L\) is typically chosen as \(L = \lfloor 4(n/100)^{2/9} \rfloor\) (Newey-West rule of thumb) or \(L = \lfloor 0.75 \cdot n^{1/3} \rfloor\).
Practical recommendation: Use HAC SEs as the default for any time-series regression. They are valid under very general conditions — you don't need to know the exact form of the serial correlation.
2. GLS with AR(1) Errors: Quasi-Differencing
When the error process is known (or assumed) to be AR(1), Generalized Least Squares (GLS) eliminates the serial correlation by transforming the model.
Population model:
Quasi-differencing transformation: Subtract \(\rho\) times the lagged equation from the current equation:
Define the quasi-differenced variables:
Then the transformed model is:
where \(e_t\) is i.i.d. — so OLS on the quasi-differenced model is BLUE (Gauss-Markov applies).
Note on the first observation: Under Prais-Winsten, the first observation is transformed as \(\tilde{y}_1 = \sqrt{1-\rho^2} \cdot y_1\) (preserves it). Under Cochrane-Orcutt, the first observation is dropped.
3. Feasible GLS (FGLS)
In practice \(\rho\) is unknown and must be estimated. The Feasible GLS (or FGLS) procedure:
Step 1: Estimate the original model by OLS, obtain residuals \(\hat{u}_t\).
Step 2: Estimate \(\rho\) by regressing \(\hat{u}_t\) on \(\hat{u}_{t-1}\) (without intercept):
Step 3: Form quasi-differenced variables using \(\hat{\rho}\):
Step 4: Regress \(\tilde{y}_t\) on \(\tilde{x}_t\) by OLS — these are the Cochrane-Orcutt estimates.
Iterative Cochrane-Orcutt repeats Steps 2–4 until \(\hat{\rho}\) converges.
4. First Differencing as a Special Case
If \(\rho \approx 1\) (the process is near a unit root), quasi-differencing with \(\hat{\rho} \approx 1\) becomes first differencing:
First differencing removes any I(1) non-stationarity and eliminates AR(1) serial correlation when \(\rho = 1\). It is common practice for trending macro series (GDP, price levels, employment). The cost: the constant \(\beta_0\) is absorbed, and you lose one observation.
Comparing HAC vs GLS
| Feature | HAC SEs (OLS + corrected SEs) | FGLS (Cochrane-Orcutt) |
|---|---|---|
| Point estimates change? | No — only SEs change | Yes — both \(\hat{\beta}\) and SEs change |
| Requires knowing error structure? | No | Yes (assumes AR(1)) |
| Efficiency | Less efficient if AR(1) is correct | More efficient under correct specification |
| Robustness | More robust to mis-specification | Sensitive to wrong \(\rho\) or wrong order |
| Practical recommendation | Default choice | Use only with strong AR(1) evidence |
Worked Example
Setup: Annual data on interest rates and inflation, \(n = 50\) years.
OLS estimates (with standard SEs):
| Coeff | Std Err | \(t\) | |
|---|---|---|---|
| Intercept | 1.42 | 0.38 | 3.74 |
| inflation | 0.81 | 0.12 | 6.75 |
Diagnostics: BG test (p=1) gives LM = 8.3 > \(\chi^2_{1,0.05} = 3.84\) → serial correlation confirmed. \(\hat{\rho} = 0.52\).
Step 1: Apply Cochrane-Orcutt
Quasi-differenced variables (\(t = 2, \ldots, 50\)):
Step 2: OLS on transformed model — FGLS estimates:
| Coeff | Std Err | \(t\) | |
|---|---|---|---|
| \(\tilde{\beta}_0\) (intercept) | 0.68 | 0.24 | 2.83 |
| inflation | 0.74 | 0.16 | 4.63 |
Step 3: OLS with HAC SEs (Newey-West, \(L = 3\)):
| Coeff | Std Err (HAC) | \(t\) | |
|---|---|---|---|
| Intercept | 1.42 | 0.52 | 2.73 |
| inflation | 0.81 | 0.19 | 4.26 |
Comparison:
| Method | \(\hat{\beta}_1\) (inflation) | SE | \(t\)-stat |
|---|---|---|---|
| OLS (naive) | 0.81 | 0.12 | 6.75 |
| OLS + HAC | 0.81 | 0.19 | 4.26 |
| FGLS (CO) | 0.74 | 0.16 | 4.63 |
Conclusions: - HAC keeps the OLS coefficient (0.81) but widens the SE from 0.12 to 0.19 — the \(t\)-stat falls from 6.75 to 4.26. Still significant but less dramatically so. - FGLS changes the coefficient estimate (0.81 → 0.74) and widens the SE. Different interpretation: the estimated effect of inflation on interest rates is smaller under FGLS. - Naive OLS \(t = 6.75\) is inflated — the true evidence is weaker.
Common Misconception
"Correcting for serial correlation changes the coefficient estimates."
This is only partially true — it depends on the method:
- HAC SEs: The OLS point estimates are unchanged. Only the standard errors (and hence \(t\)-stats and confidence intervals) change. This is the most common and recommended correction.
- GLS/FGLS (Cochrane-Orcutt): Both the coefficient estimates and the standard errors change, because the estimator itself changes — it minimises a different (weighted) objective function.
The key distinction: HAC is a correction to inference, not estimation. GLS is a correction to both.
Practice Prompts
-
A researcher estimates a wage-inflation model and finds \(\hat{\rho} = 0.65\) from OLS residuals. They apply Cochrane-Orcutt. After transformation, the coefficient on inflation changes from 0.52 to 0.39 and the standard error increases from 0.08 to 0.13. Compute the \(t\)-statistic for the OLS and FGLS estimates. Which should the researcher report, and why?
-
For a monthly financial time series with \(n = 240\), compute the Newey-West bandwidth \(L\) using the rule \(L = \lfloor 4(n/100)^{2/9} \rfloor\). How does this bandwidth affect the bias-variance tradeoff in the HAC estimator?
-
A researcher has annual GDP data and suspects the error process may be AR(1) with \(\rho\) close to 1. They apply Cochrane-Orcutt with \(\hat{\rho} = 0.97\). Explain why first differencing might be more appropriate than Cochrane-Orcutt in this case, and what additional diagnostic (unit root test) they should run first.
Further Resources
- Wooldridge, Introductory Econometrics (7th ed.), Ch 12.3
- Newey, W.K. & West, K.D. (1987), "A Simple, Positive Semi-definite, Heteroskedasticity and Autocorrelation Consistent Covariance Matrix," Econometrica, 55(3), 703–708
- Cochrane, D. & Orcutt, G.H. (1949), "Application of Least Squares Regression to Relationships Containing Auto-Correlated Error Terms," JASA
- Python:
sm.OLS(y, X).fit(cov_type='HAC', cov_kwds={'maxlags': L}); Stata:newey y x, lag(L)