linearmodels.iv.gmm.KernelWeightMatrix¶
- class KernelWeightMatrix(kernel='bartlett', bandwidth=None, center=False, debiased=False, optimal_bw=False)[source]¶
Heteroskedasticity, autocorrelation robust weight estimation
- Parameters
- kernel
str
Name of kernel weighting function to use
- bandwidth{
int
,None
} Bandwidth to use when computing kernel weights
- centerbool
Flag indicating whether to center the moment conditions by subtracting the mean before computing the weight matrix.
- debiasedbool
Flag indicating whether to use small-sample adjustments
- optimal_bwbool
Flag indicating whether to estimate the optimal bandwidth, when bandwidth is None. If False, nobs - 2 is used
- kernel
See also
Notes
Supported kernels:
“bartlett”, “newey-west” - Bartlett’s kernel
“parzen”, “gallant” - Parzen’s kernel
“qs”, “quadratic-spectral”, “andrews” - The quadratic spectral kernel
\[\begin{split}g_i & =z_i \epsilon_i \\ W & =n^{-1}(\Gamma_0+\sum_{j=1}^{n-1}k(j)(\Gamma_j+\Gamma_j')) \\ \Gamma_j & =\sum_{i=j+1}^n g'_i g_{j-j}\end{split}\]where \(k(j)\) is the kernel weight for lag j and \(z_i\) contains both the exogenous regressors and instruments..
- Attributes
Methods
weight_matrix
(x, z, eps)- Parameters
Properties
Actual bandwidth used in estimating the weight matrix
Weight estimator configuration