linearmodels.iv.model.IVGMM.fit

IVGMM.fit(*, iter_limit=2, tol=0.0001, initial_weight=None, cov_type='robust', debiased=False, **cov_config)[source]

Estimate model parameters

Parameters:
iter_limitint

Maximum number of iterations. Default is 2, which produces two-step efficient GMM estimates. Larger values can be used to iterate between parameter estimation and optimal weight matrix estimation until convergence.

tolfloat

Convergence criteria. Measured as covariance normalized change in parameters across iterations where the covariance estimator is based on the first step parameter estimates.

initial_weightndarray

Initial weighting matrix to use in the first step. If not specified, uses the average outer-product of the set containing the exogenous variables and instruments.

cov_typestr

Name of covariance estimator to use. Available covariance functions are:

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

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

  • “kernel” - Allows for heteroskedasticity and autocorrelation

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

debiasedbool

Flag indicating whether to debiased the covariance estimator using a degree of freedom adjustment.

**cov_config

Additional parameters to pass to covariance estimator. Supported parameters depend on specific covariance structure assumed. See linearmodels.iv.gmm.IVGMMCovariance for details on the available options. Defaults are used if no covariance configuration is provided.

Returns:
IVGMMResults

Results container

Return type:

OLSResults | IVGMMResults