Compute OLS parameters and robust standard errors based on Newey and West (1987). The function is based on the Matlab code by James P. LeSage.
newey_west(y, x, h)
Numeric vector.
Numeric matrix.
Integer.
A list. The first element contains the estimated OLS parameters and the second element the covariance matrix of the parameters.
Newey, W.K., and West, K.D. (1987). <U+201C>A Simple, Positive-Definite, Heteroskedasticity and Autocorrelation Consistent Covariance Matrix.<U+201D> Econometrica, 55, 703<U+2013>708.