Learn R Programming

ConvergenceClubs (version 2.2.5)

ps_andrews_hac: Long run variance of errors

Description

Estimate long run variance of errors through Andrews' method

Usage

ps_andrews_hac(x)

Value

a numeric value representing the long run variance of errors

Arguments

x

vector of residuals

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

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.