# 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

Observation weights used in estimation

fullerfloat

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

kappafloat

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

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

Attributes:
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

Methods

 estimate_parameters(x, y, z, kappa) Parameter estimation without error checking fit(*[, cov_type, debiased]) Estimate model parameters from_formula(formula, data, *[, weights, ...]) Parameters: predict(params, *[, exog, endog, data, eval_env]) Predict values for additional data resids(params) Compute model residuals wresids(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