Estimate long run variance of errors through Andrews' method
Usage
ps_andrews_hac(x)
Arguments
x
vector of residuals
Value
a numeric value representing the long run variance of errors
Details
This function computes the long run variance of residuals of an lm model
by means of Andrews' with Quadratic Spectral kernel and fixed bandwidth.
The code is an adaptation of Phillips and Sul (2007)'s code,
which was written in GAUSS.
References
Phillips, P. C.; Sul, D., 2007.
Transition modeling and econometric convergence tests. Econometrica 75 (6), 1771-1855.