statsmodels.sandbox.sysreg.Sem2SLS

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

Two-Stage Least Squares for Simultaneous equations

Parameters
syslist

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

indep_endogdict

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.

instrumentsndarray

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.

Methods

whiten(Y)

Runs the first stage of the 2SLS.

fit

Methods

fit()

whiten(Y)

Runs the first stage of the 2SLS.