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

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

equations : dict

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.

sigma : array_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_type : str

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

**weight_config : bool | str | float

Additional keyword arguments to pass to the moment condition weight function


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\]


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


\[\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.


add_constraints(r[, q])

Add parameter constraints to a model.

fit(*[, iter_limit, tol, initial_weight, ...])

Estimate model parameters

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

Specify a 3SLS using the formula interface

predict(params, *[, equations, data, eval_env])

Predict values for additional data


Remove all model constraints



Model constraints


Set or get the formula used to construct the model


Vector indicating which equations contain constants


Model parameter names