Newey–West estimator
A Newey–West estimator is used in statistics and econometrics to provide an estimate of the covariance matrix of the parameters of a regression-type model when this model is applied in situations where the standard assumptions of regression analysis do not apply.[1] It was devised by Whitney K. Newey and Kenneth D. West in 1987, although there are a number of later variants.[2][3][4][5] The estimator is used to try to overcome autocorrelation (also called serial correlation), and heteroskedasticity in the error terms in the models, often for regressions applied to time series data. The abbreviation "HAC," sometimes used for the estimator, stands for "heteroskedasticity and autocorrelation consistent."[2]
The problem in autocorrelation, often found in time series data, is that the error terms are correlated over time. This can be demonstrated in , a matrix of sums of squares and cross products that involves and the rows of . The least squares estimator is a consistent estimator of . This implies that the least squares residuals are "point-wise" consistent estimators of their population counterparts . The general approach, then, will be to use and to devise an estimator of .[6] This means that as the time between error terms increases, the correlation between the error terms decreases. The estimator thus can be used to improve the ordinary least squares (OLS) regression when the residuals are heteroskedastic and/or autocorrelated.
can be thought of as a `weight'. Disturbances that are farther apart from each other are given lower weight, while those with equal subscripts are given a weight of 1. This ensures that second term converges (in some appropriate sense) to a finite matrix. This weighting scheme also ensures that the resulting covariance matrix is positive semi-definite.[2]
Software implementations
In Julia, the CovarianceMatrices.jl package [7] supports several types of heteroskedasticity and autocorrelation consistent covariance matrix estimation including Newey–West, White, and Arellano.
In R, the packages sandwich
[8] and plm
[9] include a function for the Newey–West estimator.
In Stata, the command newey
produces Newey–West standard errors for coefficients estimated by OLS regression.[10]
In MATLAB, the command hac
in the Econometrics toolbox produces the Newey–West estimator (among others). [11]
In Python, the statsmodels
[12] module includes functions for the covariance matrix using Newey-West.
In Gretl, the option --robust
to several estimation commands (such as ols
) in the context of a time-series dataset produces Newey–West standard errors.[13]
In SAS, the Newey-West corrected standard errors can be obtained in PROC AUTOREG and PROC MODEL [14]
References
- "Newey West estimator – Quantitative Finance Collector". Archived from the original on 2018-06-24. Retrieved 2009-05-18.
- Newey, Whitney K; West, Kenneth D (1987). "A Simple, Positive Semi-definite, Heteroskedasticity and Autocorrelation Consistent Covariance Matrix" (PDF). Econometrica. 55 (3): 703–708. doi:10.2307/1913610. JSTOR 1913610.
- Andrews, Donald W. K. (1991). "Heteroskedasticity and autocorrelation consistent covariance matrix estimation" (PDF). Econometrica. 59 (3): 817–858. doi:10.2307/2938229. JSTOR 2938229.
- Newey, Whitney K.; West, Kenneth D. (1994). "Automatic lag selection in covariance matrix estimation" (PDF). Review of Economic Studies. 61 (4): 631–654. doi:10.2307/2297912. JSTOR 2297912.
- Smith, Richard J. (2005). "Automatic positive semidefinite HAC covariance matrix and GMM estimation" (PDF). Econometric Theory. 21 (1): 158–170. doi:10.1017/S0266466605050103.
- Greene, William H. (1997). Econometric Analysis (3rd ed.).
- "CovarianceMatrices.jl package".
- "sandwich: Robust Covariance Matrix Estimators". CRAN.
- "plm: Linear Models for Panel Data". CRAN.
- "Regression with Newey–West standard errors" (PDF). Stata Manual.
- "Heteroscedasticity and autocorrelation consistent covariance estimators". Econometrics Toolbox.
- "statsmodels: Statistics". statsmodels.
- "Robust covariance matrix estimation" (PDF). Gretl User's Guide, chapter 22.
- "Usage Note 40098: Newey-West correction of standard errors for heteroscedasticity and autocorrelation".
Further reading
- Bierens, Herman J. (1994). Topics in Advanced Econometrics : Estimation, Testing, and Specification of Cross-section and Time Series Models. New York: Cambridge University Press. pp. 195–198. ISBN 978-0-521-41900-0.
- Hamilton, James D. (1994). Time Series Analysis. Princeton University Press. pp. 279–285. ISBN 978-0-691-04289-3.
- Hayashi, Fumio (2000). Econometrics. Princeton: Princeton University Press. pp. 408–410. ISBN 978-0-691-01018-2.
- Stock, James H.; Watson, Mark M. (2012). Introduction to Econometrics (Third international ed.). Harlow: Pearson. pp. 637–642. ISBN 978-1-4082-6433-1.
- Zeileis, A. (2004). "Econometric Computing with HC and HAC Covariance Matrix Estimators". Journal of Statistical Software. 11 (10): 1–17. doi:10.18637/jss.v011.i10.