linearmodels.iv.model.IVLIML

class IVLIML(dependent, exog, endog, instruments, *, weights=None, fuller=0, kappa=None)[source]

Limited information ML and k-class estimation of IV models

Parameters
dependentarray_like

Endogenous variables (nobs by 1)

exogarray_like

Exogenous regressors (nobs by nexog)

endogarray_like

Endogenous regressors (nobs by nendog)

instrumentsarray_like

Instrumental variables (nobs by ninstr)

weightsarray_like, default None

Observation weights used in estimation

fullerfloat, default 0

Fuller’s alpha to modify LIML estimator. Default returns unmodified LIML estimator.

kappafloat, default None

Parameter value for k-class estimation. If None, computed to produce LIML parameter estimate.

See also

IV2SLS, IVGMM, IVGMMCUE

Notes

kappa and fuller should not be used simultaneously since Fuller’s alpha applies an adjustment to kappa, and so the same result can be computed using only kappa. Fuller’s alpha is used to adjust the LIML estimate of \(\kappa\), which is computed whenever kappa is not provided.

The LIML estimator is defined as

\[\begin{split}\hat{\beta}_{\kappa} & =(X(I-\kappa M_{z})X)^{-1}X(I-\kappa M_{z})Y\\ M_{z} & =I-P_{z}\\ P_{z} & =Z(Z'Z)^{-1}Z'\end{split}\]

where \(Z\) contains both the exogenous regressors and the instruments. \(\kappa\) is estimated as part of the LIML estimator.

When using Fuller’s \(\alpha\), the value used is modified to

\[\kappa-\alpha/(n-n_{instr})\]

Todo

  • VCV: bootstrap

Methods

estimate_parameters(x, y, z, kappa, float])

Parameter estimation without error checking

fit(self, \*, cov_type, debiased, \*\*cov_config)

Estimate model parameters

from_formula(formula, data, \*, weights, …)

Parameters

predict(self, params, …)

Predict values for additional data

resids(self, params)

Compute model residuals

wresids(self, params)

Compute weighted model residuals

Properties

formula

Formula used to create the model

has_constant

Flag indicating the model includes a constant or equivalent

isnull

Locations of observations with missing values

notnull

Locations of observations included in estimation