linearmodels.iv.covariance.kernel_weight_quadratic_spectral¶
- linearmodels.iv.covariance.kernel_weight_quadratic_spectral(bw: float, n: int) ndarray[Any, dtype[float64]] [source]¶
Kernel weights from a quadratic-spectral kernel
Notes
Unlike the Bartlett or Parzen kernels, the QS kernel is not truncated at a specific lag, and so weights are computed for all available lags in the sample.
\[\begin{split}z_i & = 6 \pi (i / m) / 5 \\ w_0 & = 1 \\ w_i & = 3(\sin(z_i)/z_i - cos(z_i))/z_i^ 2, \, i \geq 1\end{split}\]where m is the bandwidth.