- class statsmodels.sandbox.sysreg.Sem2SLS(sys, indep_endog=None, instruments=None)¶
Two-Stage Least Squares for Simultaneous equations
[endog1, exog1, endog2, exog2,…] It will be of length 2 x M, where M is the number of equations endog = exog.
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 entered 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.
Array of the exogenous independent variables.
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.
Runs the first stage of the 2SLS.