linearmodels.system.model.IVSystemGMM

class IVSystemGMM(equations, *, sigma=None, weight_type='robust', **weight_config)[source]

System Generalized Method of Moments (GMM) estimation of linear IV models

Parameters
equationsdict

Dictionary-like structure containing dependent, exogenous, endogenous and instrumental variables. Each key is an equations label and must be a string. Each value must be either a tuple of the form (dependent, exog, endog, instrument[, weights]) or a dictionary with keys ‘dependent’, ‘exog’. The dictionary may contain optional keys for ‘endog’, ‘instruments’, and ‘weights’. Endogenous and/or Instrument can be empty if all variables in an equation are exogenous.

sigmaarray_like

Prespecified residual covariance to use in GLS estimation. If not provided, FGLS is implemented based on an estimate of sigma. Only used if weight_type is ‘unadjusted’

weight_typestr

Name of moment condition weight function to use in the GMM estimation

**weight_config

Additional keyword arguments to pass to the moment condition weight function

Notes

Estimates a linear model using GMM. Each equation is of the form

\[y_{i,k} = x_{i,k}\beta_i + \epsilon_{i,k}\]

where k denotes the equation and i denoted the observation index. By stacking vertically arrays of dependent and placing the exogenous variables into a block diagonal array, the entire system can be compactly expressed as

\[Y = X\beta + \epsilon\]

where

\[\begin{split}Y = \left[\begin{array}{x}Y_1 \\ Y_2 \\ \vdots \\ Y_K\end{array}\right]\end{split}\]

and

\[\begin{split}X = \left[\begin{array}{cccc} X_1 & 0 & \ldots & 0 \\ 0 & X_2 & \dots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \dots & X_K \end{array}\right]\end{split}\]

The system GMM estimator uses the moment condition

\[z_{ij}(y_{ij} - x_{ij}\beta_j) = 0\]

where j indexes the equation. The estimator for the coefficients is given by

\[\begin{split}\hat{\beta}_{GMM} & = (X'ZW^{-1}Z'X)^{-1}X'ZW^{-1}Z'Y \\\end{split}\]

where \(W\) is a positive definite weighting matrix.

Methods

add_constraints(self, r, q, NoneType] = None)

Add parameter constraints to a model.

fit(self, \*, iter_limit, tol, …)

Estimate model parameters

from_formula(formula, Dict[str, str]], data, …)

Specify a 3SLS using the formula interface

predict(self, params, …)

Predict values for additional data

reset_constraints(self)

Remove all model constraints

Properties

constraints

Model constraints

formula

Set or get the formula used to construct the model

has_constant

Vector indicating which equations contain constants

param_names

Model parameter names