- Introduced by
- Whitney Newey & Kenneth West
- Year
- 1987
- Type
- Covariance matrix estimator
- Family
- Robust inference
What does it do?
Newey-West HAC standard errors, introduced by Whitney Newey and Kenneth West in 1987, give a covariance matrix estimator for OLS regression that remains valid under heteroskedasticity and serial autocorrelation of unknown form.
They are used to correct inference in time-series and panel regressions whose residuals are not independent and identically distributed. Unlike parametric alternatives, they do not require a specified error model, only a choice of bandwidth.
The intuition behind the method
Ordinary OLS standard errors assume residuals are independent and identically distributed. In time-series data, residuals often cluster in time — a large shock today predicts a large shock tomorrow — and their variance may shift over the sample. Newey-West replaces the naive variance formula with a weighted average of cross-products of residuals at different lags, giving less weight to more distant lags through the Bartlett kernel, so that distant observations contribute less to the estimated covariance while positive semi-definiteness of the resulting matrix is guaranteed.
History
Newey and West (1987) published in Econometrica a simple method for estimating a heteroskedasticity and autocorrelation consistent covariance matrix. The construction is positive semi-definite by design, and the paper establishes consistency of the estimated covariance matrix under fairly general conditions. The estimator is the basis of the HAC standard errors described on this page.
When to use it
Choose Newey-West HAC standard errors when OLS is the estimator of interest, the residuals show serial correlation, heteroskedasticity, or both, and the form of the dependence is unknown. Typical settings are time-series regressions and panel regressions with a time dimension. Consistency requires the bandwidth L to grow with the sample size while remaining small relative to it; the precise rate condition must be verified in Newey and West (1987) before use. Avoid the estimator when the main dependence runs across groups of observations within the same period, where cluster-robust errors are the better choice, or when a correctly specified parametric model such as FGLS is available and efficiency matters. The method corrects standard errors only, not the point estimates.
Limitations and considerations
- Finite-sample accuracy depends on the bandwidth: a bandwidth that is too small leaves autocorrelation partly uncorrected, while one that is too large adds noise to the variance estimate.
- The adjustment addresses dependence over time. Dependence across cross-sectional units requires separate cluster-robust estimators.
- The point estimates are unchanged. If residuals are serially correlated, OLS remains consistent under exogeneity but is less efficient than FGLS or GLS.
- Data-driven bandwidth rules, such as plug-in approaches that estimate L from the fitted residual dynamics, may still undercover in highly persistent processes.
- T-tests and confidence intervals based on HAC standard errors can deviate substantially from their nominal levels in finite samples, often rejecting less than intended. The distortion is larger with short samples, strong persistence or a large bandwidth, so results should be checked with robustness analysis such as alternative bandwidths or simulation.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Gives valid standard errors under heteroskedasticity and autocorrelation of unknown form, without modelling the error process.
- The Bartlett weights make the estimated long-run covariance matrix positive semi-definite, so the resulting variance matrix is non-negative definite by construction, as stated in the original paper's abstract.
- Implemented in standard econometric software, so the adjustment requires little extra work.
- Consistency holds under fairly general conditions as the bandwidth grows appropriately with the sample size.
Applications
- Inference on coefficients in time-series regressions where OLS residuals display serial correlation.
- Long-horizon predictability regressions, where overlapping observations produce autocorrelated residuals.
- Regressions on quarterly or annual macroeconomic series, such as GDP, inflation or unemployment, where residuals are persistent.
- Panel regressions with a time dimension, where residuals are correlated over time within each unit.
How it works
How it works
Estimate the regression by OLS and collect the residuals. These residuals carry the autocorrelation and heteroskedasticity that would distort standard inference if ignored.
Formula
\hat{u}_t = y_t - x_t^{\prime}\hat{\beta}_{OLS}, \quad t = 1, \ldots, TFor each lag j from 0 up to the chosen bandwidth L, sum the products of residuals at times t and t−j over all available pairs, each multiplied by the regressor vectors at those times, and divide the sum by T. Each matrix shows how residuals at lag j move together in the direction of the regressors.
Formula
\hat{\Gamma}_j = \frac{1}{T} \sum_{t=j+1}^{T} \hat{u}_t \hat{u}_{t-j} x_t x_{t-j}^{\prime}, \quad j = 0, 1, \ldots, LSum the lag matrices with Bartlett (triangular) weights, which decline linearly from 1 at lag 0 to 0 at lag L+1. This tapering of distant lags is what makes the resulting long-run variance estimate positive semi-definite.
Formula
\hat{S} = \hat{\Gamma}_0 + \sum_{j=1}^{L} \left(1 - \frac{j}{L+1}\right)\left(\hat{\Gamma}_j + \hat{\Gamma}_j^{\prime}\right)Sandwich the long-run variance estimate between the inverse of the regressor cross-product matrix to obtain the HAC covariance matrix of the OLS estimator. Robust standard errors and t-statistics are computed from its diagonal.
Formula
\widehat{\mathrm{Var}}(\hat{\beta})_{HAC} = (X^{\prime}X)^{-1}\hat{S}\,(X^{\prime}X)^{-1}Common pitfalls
- Fixing the bandwidth at a constant regardless of sample size undermines the asymptotic justification, because the bandwidth must grow with the sample.
- Applying HAC standard errors without first examining residual autocorrelation can hide a misspecified dynamic model that should be corrected directly.
- Treating the HAC correction as a remedy for omitted-variable bias or endogeneity. It changes only the standard errors and does not restore consistency of the estimates.
Frequently asked questions
How do I choose the bandwidth L?
The bandwidth must grow with the sample size, but its exact rate condition should be verified in Newey and West (1987) rather than taken from this page. Data-driven rules estimate L from the data, for example by fitting a simple parametric model such as an AR(1) to the residuals. Software implementations differ in how the bandwidth is set: some require it explicitly, while others choose it automatically. Check the documentation of the package in use and report the lag that was applied.
Does Newey-West fix autocorrelation in my model?
No. HAC standard errors adjust hypothesis tests and confidence intervals for autocorrelation but leave OLS point estimates unchanged. If residuals are autocorrelated, OLS remains consistent under exogeneity but is inefficient; FGLS or GLS would produce more precise estimates. HAC is a diagnostic aid, not a structural cure.
When should I use cluster-robust rather than HAC standard errors?
Use cluster-robust errors when the dominant dependence is across observations within groups (e.g., individuals within firms or regions) rather than across time. In panel data with both cross-sectional and temporal dependence, two-way cluster-robust estimators or Driscoll-Kraay standard errors may be more appropriate than HAC alone.
Related methods
Sources
Newey, W. K., & West, K. D. (1987). A simple, positive semi-definite, heteroskedasticity and autocorrelation consistent covariance matrix. Econometrica, 55(3), 703–708.
Open DOI reference