linearmodels.iv.model.IVLIML

class linearmodels.iv.model.IVLIML(dependent: IVData | ndarray | DataArray | DataFrame | Series, exog: IVData | ndarray | DataArray | DataFrame | Series | None, endog: IVData | ndarray | DataArray | DataFrame | Series | None, instruments: IVData | ndarray | DataArray | DataFrame | Series | None, *, weights: IVData | ndarray | DataArray | DataFrame | Series | None = None, fuller: int | float = 0, kappa: int | float | None = None)[source]

Limited information ML and k-class estimation of IV models

Parameters:
dependent: IVData | ndarray | DataArray | DataFrame | Series

Endogenous variables (nobs by 1)

exog: IVData | ndarray | DataArray | DataFrame | Series | None

Exogenous regressors (nobs by nexog)

endog: IVData | ndarray | DataArray | DataFrame | Series | None

Endogenous regressors (nobs by nendog)

instruments: IVData | ndarray | DataArray | DataFrame | Series | None

Instrumental variables (nobs by ninstr)

weights: IVData | ndarray | DataArray | DataFrame | Series | None = None

Observation weights used in estimation

fuller: int | float = 0

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

kappa: int | float | None = None

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

Methods

estimate_parameters(x, y, z, kappa)

Parameter estimation without error checking

fit(*[, cov_type, debiased])

Estimate model parameters

from_formula(formula, data, *[, weights, ...])

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