Learn R Programming

lpirfs (version 0.1.0)

newey_west_c: Compute OLS parameters and robust standard errors based on Newey-West estimator

Description

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.

Usage

newey_west_c(y, x, h)

Arguments

y

Numeric vector

x

Numeric matrix

h

Integer

References

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.