a $n\times q$ matrix of time series, where n is the sample size.
weights
The method to compute the kernel weights. For now, weightsAndrews2 is the only one possible. I leave the option there because I am planning to give more choices in futur versions of the package.
prewhite
logical or integer. Should the estimating functions
be prewhitened? If TRUE or greater than 0 a VAR model of
order as.integer(prewhite) is fitted via ar with
method "ols" and demean = F
ar.method
character. The method argument passed to
ar for prewhitening.
kernel
The choice of kernel
Value
A $q \times q$ matrix containing an estimator of the asymptotic variance of
$\sqrt{n} \bar{x}$, where $\bar{x}$ is $q\times 1$ vector with
typical element $\bar{x}_i = \frac{1}{n}\sum_{j=1}^nx_{ji}$. This function is called by gmm() but can also be used by itself.
Details
HAC is simply a modified version of meatHAC from the package sandwich. The modifications have been made so that the argument x can be a matrix instead of an object of class lm or glm. The details on how is works can be found on the sandwich manual.
References
Zeileis A (2006), Object-oriented Computation of Sandwich Estimators.
Journal of Statistical Software, 16(9), 1--16.
URL http://www.jstatsoft.org/v16/i09/.