ps_andrews_hac: Long run variance of errors

View source: R/ps_andrews_hac.R

ps_andrews_hacR Documentation

Long run variance of errors

Description

Estimate long run variance of errors through Andrews' method

Usage

ps_andrews_hac(x)

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.

Value

a numeric value representing the long run variance of errors

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.


ConvergenceClubs documentation built on June 14, 2022, 1:06 a.m.