View source: R/ps_andrews_hac.R
ps_andrews_hac | R Documentation |
Estimate long run variance of errors through Andrews' method
ps_andrews_hac(x)
x |
vector of residuals |
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.
a numeric value representing the long run variance of errors
Andrews, D. W., 1991. Heteroskedasticity and autocorrelation consistent covariance matrix estimation. Econometrica: Journal of the Econometric Society, 817-858.
Phillips, P. C.; Sul, D., 2007. Transition modeling and econometric convergence tests. Econometrica 75 (6), 1771-1855.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.