7.19.4.19. statsmodels.sandbox.sysreg.Sem2SLS

class statsmodels.sandbox.sysreg.Sem2SLS(sys, indep_endog=None, instruments=None)[source]

Two-Stage Least Squares for Simultaneous equations

Parameters:

sys : list

[endog1, exog1, endog2, exog2,...] It will be of length 2 x M, where M is the number of equations endog = exog.

indep_endog : dict

A dictionary mapping the equation to the column numbers of the the independent endogenous regressors in each equation. It is assumed that the system is inputed as broken up into LHS and RHS. For now, the values of the dict have to be sequences. Note that the keys for the equations should be zero-indexed.

instruments : array

Array of the exogenous independent variables.

Notes

This is unfinished, and the design should be refactored. Estimation is done by brute force and there is no exploitation of the structure of the system.

__init__(sys, indep_endog=None, instruments=None)[source]

Methods

__init__(sys[, indep_endog, instruments])
fit()
whiten(Y) Runs the first stage of the 2SLS.