x: a n×q matrix of time series, where n is the sample size.
bw: The method to compute the bandwidth parameter. By default, it uses the bandwidth proposed by Andrews(1991). As an alternative, we can choose bw=bwNeweyWest (without "") which is proposed by Newey-West(1996).
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 = FALSE.
ar.method: character. The method argument passed to ar for prewhitening.
weights: The smoothing weights can be computed by weightsAndrews of it can be provided manually. If provided, it has to be a r×1vector (see details).
approx: a character specifying the approximation method if the bandwidth has to be chosen by bwAndrews.
tol: numeric. Weights that exceed tol are used for computing the covariance matrix, all other weights are treated as 0.
kernel: The choice of kernel
Details
The sample moment conditions ∑t=1ng(θ,xt) is replaced by: ∑t=1ngk(θ,xt), where gk(θ,xt)=∑i=−rrk(i)g(θ,xt+i), where r is a truncated parameter that depends on the bandwidth and k(i) are normalized weights so that they sum to 1.
If the vector of weights is provided, it gives only one side weights. For exemple, if you provide the vector (1,.5,.25), k(i) will become (.25,.5,1,.5,.25)/(.25+.5+1+.5+.25)=(.1,.2,.4,.2,.1)
Returns
smoothx: A q×q matrix containing an estimator of the asymptotic variance of nxˉ, where xˉ is q×1vector with typical element xˉi=n1∑j=1nxji. This function is called by gel but can also be used by itself.
kern_weights: Vector of weights used for the smoothing.
References
Anatolyev, S. (2005), GMM, GEL, Serial Correlation, and Asymptotic Bias. Econometrica, 73 , 983-1002.