linearmodels.iv.gmm.IVGMMCovariance

class linearmodels.iv.gmm.IVGMMCovariance(x: ndarray[Any, dtype[float64]], y: ndarray[Any, dtype[float64]], z: ndarray[Any, dtype[float64]], params: ndarray[Any, dtype[float64]], w: ndarray[Any, dtype[float64]], cov_type: str = 'robust', debiased: bool = False, **cov_config: str | bool)[source]

Covariance estimation for GMM models

Parameters:
x: ndarray[Any, dtype[float64]]

Model regressors (nobs by nvar)

y: ndarray[Any, dtype[float64]]

Series ,modeled (nobs by 1)

z: ndarray[Any, dtype[float64]]

Instruments used for endogenous regressors (nobs by ninstr)

params: ndarray[Any, dtype[float64]]

Estimated model parameters (nvar by 1)

w: ndarray[Any, dtype[float64]]

Weighting matrix used in GMM estimation

cov_type: str = 'robust'

Covariance estimator to use Valid choices are

  • ”unadjusted”, “homoskedastic” - Assumes moment conditions are homoskedastic

  • ”robust”, “heteroskedastic” - Allows for heteroskedasticity by not autocorrelation

  • ”kernel” - Allows for heteroskedasticity and autocorrelation

  • ”clustered” - Allows for one-way cluster dependence

debiased: bool = False

Flag indicating whether to debias the covariance estimator

**cov_config: str | bool

Optional keyword arguments that are specific to a particular cov_type

Notes

Optional keyword argument for specific covariance estimators:

kernel

  • kernel: Name of kernel to use. See KernelCovariance for details on available kernels

  • bandwidth: Bandwidth to use when computing the weight. If not provided, nobs - 2 is used.

cluster

Methods

Properties

config

cov

Covariance of estimated parameters

debiased

Flag indicating if covariance is debiased

s

Score covariance estimate

s2

Estimated variance of residuals.