hac()
corrects the estimated errors based on options of prewhitening
using a AR(1) process estimation of error terms to obtain
heteroskedasticy and autocorrelation consistency (HAC) errors with automatic
bandwith and kernel similar to Andrews, 1994
correct(reg, res, prewhit)
hac Heteroskedasticy and autocorrelation consistent errors
matrix of regressors
matrix of estimated residuals
Option of using prewhitening process. If 1
, an AR(1)
process will be used to filter. If 0
, skipped the filtering process