Module ImportFrom alias ImportFrom alias Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore ListLoad Str Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body If CompareNotEq BinOpMod Call NameLoad NameLoad Num Num body Raise Call NameLoad BinOpMod Str Call NameLoad NameLoad If NameLoad body If UnaryOpNot CompareIn Call AttributeLoad NameLoad attr ListLoad Str Str body Raise Call NameLoad BinOpMod Str NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Slice Num Num Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr GeneratorExp Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad NameLoad Slice Num Num Index NameLoad comprehension NameStore Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Index Num Assign NameStore ListLoad Assign NameStore ListLoad Expr ListComp Call AttributeLoad NameLoad attr BinOpSub AttributeLoad NameLoad attr Call NameLoad NameLoad comprehension NameStore SubscriptLoad NameLoad Slice Num Num Expr ListComp Call AttributeLoad NameLoad attr BinOpSub Call NameLoad NameLoad Num comprehension NameStore SubscriptLoad NameLoad Slice Num Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Call NameLoad BinOpMult AttributeLoad NameLoad attr NameLoad Call NameLoad Call AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr TupleLoad Num BinOpAdd AttributeLoad NameLoad attr Num For NameStore Call NameLoad NameLoad body Assign SubscriptStore NameLoad ExtSlice Slice BinOpMult NameLoad AttributeLoad NameLoad attr BinOpMult BinOpAdd NameLoad Num AttributeLoad NameLoad attr Slice SubscriptLoad AttributeLoad NameLoad attr Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index BinOpAdd NameLoad Num SubscriptLoad SubscriptLoad NameLoad Slice Num Num Index NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse If CompareEq NameLoad NameLoad body Assign NameStore ListLoad For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad ExtSlice Slice Slice SubscriptLoad AttributeLoad NameLoad attr Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index BinOpAdd NameLoad Num attr attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Dict Str ListLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr If UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore NameLoad orelse If CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore Call AttributeLoad NameLoad attr BinOpPow NameLoad Num For NameStore Call NameLoad NameLoad body For NameStore Call NameLoad NameLoad body Assign SubscriptStore NameLoad Index BinOpAdd NameLoad NameLoad BinOpPow BinOpMult BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Num BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Num BinOpDiv Num Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr BinOpPow NameLoad Num For NameStore Call NameLoad NameLoad body For NameStore Call NameLoad NameLoad body Assign SubscriptStore NameLoad Index BinOpAdd NameLoad NameLoad BinOpSub NameLoad Call AttributeLoad NameLoad attr BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Num BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpDiv NameLoad NameLoad attr Return BinOpDiv NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr If CompareIs NameLoad AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Num Num orelse If CompareIs NameLoad AttributeLoad NameLoad attr body Return Call AttributeLoad BinOpMult Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Num Num body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd AttributeStore NameLoad attr Num If UnaryOpNot NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad AttributeLoad NameLoad attr Return NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str While BoolOpAnd NameLoad Call AttributeLoad NameLoad attr CompareGt Call AttributeLoad NameLoad attr BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num NameLoad CompareLt AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad BinOpMult AttributeLoad NameLoad attr NameLoad attr NameLoad Num Assign NameStore BinOpSub AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd AttributeStore NameLoad attr Num Assign NameStore Call NameLoad NameLoad NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Pass decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body If CompareNotEq BinOpMod Call NameLoad NameLoad Num Num body Raise Call NameLoad BinOpMod Str Call NameLoad NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Slice Num Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Slice Num Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Slice Num Num Assign AttributeStore NameLoad attr ListComp Call NameLoad NameLoad comprehension NameStore SubscriptLoad NameLoad Slice Num Num Assign AttributeStore NameLoad attr NameLoad Assign NameStore Dict Expr ListComp Call AttributeLoad NameLoad attr NameLoad ListLoad comprehension NameStore Call NameLoad NameLoad For NameStore NameLoad body For NameStore SubscriptLoad NameLoad Index NameLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad ExtSlice Slice Index NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr TupleLoad Num AttributeLoad NameLoad attr For NameStore NameLoad body TryExcept body Expr Call NameLoad SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler body Raise Call NameLoad BinOpMod Str Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr If NameLoad body For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore AttributeLoad Call AttributeLoad Call NameLoad NameLoad AttributeLoad NameLoad attr attr attr Assign SubscriptStore NameLoad ExtSlice Slice Index SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr For NameStore Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad attr attr Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad Num body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list decorator_list
N/A statsmodels.compat.python iterkeys statsmodels.regression.linear_model GLS N/A numpy np statsmodels.base.model LikelihoodModelResults scipy sparse statsmodels.compat.numpy np_matrix_rank N/A __all__ N/A SUR Sem2SLS SUR N/A object N/A N/A 
    Seemingly Unrelated Regression

    Parameters
    ----------
    sys : list
        [endog1, exog1, endog2, exog2,...] It will be of length 2 x M,
        where M is the number of equations endog = exog.
    sigma : array-like
        M x M array where sigma[i,j] is the covariance between equation i and j
    dfk : None, 'dfk1', or 'dfk2'
        Default is None.  Correction for the degrees of freedom
        should be specified for small samples.  See the notes for more
        information.

    Attributes
    ----------
    cholsigmainv : array
        The transpose of the Cholesky decomposition of `pinv_wexog`
    df_model : array
        Model degrees of freedom of each equation. p_{m} - 1 where p is
        the number of regressors for each equation m and one is subtracted
        for the constant.
    df_resid : array
        Residual degrees of freedom of each equation. Number of observations
        less the number of parameters.
    endog : array
        The LHS variables for each equation in the system.
        It is a M x nobs array where M is the number of equations.
    exog : array
        The RHS variable for each equation in the system.
        It is a nobs x sum(p_{m}) array.  Which is just each
        RHS array stacked next to each other in columns.
    history : dict
        Contains the history of fitting the model. Probably not of interest
        if the model is fit with `igls` = False.
    iterations : int
        The number of iterations until convergence if the model is fit
        iteratively.
    nobs : float
        The number of observations of the equations.
    normalized_cov_params : array
        sum(p_{m}) x sum(p_{m}) array
        :math:`\left[X^{T}\left(\Sigma^{-1}\otimes\boldsymbol{I}\right)X\right]^{-1}`
    pinv_wexog : array
        The pseudo-inverse of the `wexog`
    sigma : array
        M x M covariance matrix of the cross-equation disturbances. See notes.
    sp_exog : CSR sparse matrix
        Contains a block diagonal sparse matrix of the design so that
        exog1 ... exogM are on the diagonal.
    wendog : array
        M * nobs x 1 array of the endogenous variables whitened by
        `cholsigmainv` and stacked into a single column.
    wexog : array
        M*nobs x sum(p_{m}) array of the whitened exogenous variables.

    Notes
    -----
    All individual equations are assumed to be well-behaved, homoeskedastic
    iid errors.  This is basically an extension of GLS, using sparse matrices.

    .. math:: \Sigma=\left[\begin{array}{cccc}
              \sigma_{11} & \sigma_{12} & \cdots & \sigma_{1M}\\
              \sigma_{21} & \sigma_{22} & \cdots & \sigma_{2M}\\
              \vdots & \vdots & \ddots & \vdots\\
              \sigma_{M1} & \sigma_{M2} & \cdots & \sigma_{MM}\end{array}\right]

    References
    ----------
    Zellner (1962), Greene (2003)
     __init__ N/A N/A self sys sigma dfk N/A None None N/A N/A N/A N/A N/A len sys 2 0 N/A N/A N/A ValueError N/A sys must be a list of pairs of endogenous and exogenous variables.  Got length %s N/A len sys N/A dfk N/A N/A N/A N/A N/A N/A dfk lower N/A dfk1 dfk2 N/A N/A N/A ValueError N/A dfk option %s not understood dfk N/A N/A self _dfk dfk N/A M N/A len N/A sys N/A 1 2 N/A N/A self _M M N/A exog N/A N/A np column_stack N/A N/A N/A np asarray N/A N/A sys N/A 1 2 N/A i N/A i N/A range M N/A N/A self exog exog N/A endog N/A N/A np asarray N/A sys N/A 2 N/A N/A self endog endog N/A N/A self nobs N/A float N/A N/A N/A N/A self endog N/A 0 shape N/A 0 N/A df_resid N/A N/A df_model N/A N/A N/A N/A N/A df_resid append N/A N/A self nobs N/A np_matrix_rank _ N/A _ N/A sys N/A 1 2 N/A N/A N/A N/A df_model append N/A N/A np_matrix_rank _ 1 N/A _ N/A sys N/A 1 2 N/A N/A self df_resid N/A N/A np asarray df_resid N/A N/A self df_model N/A N/A np asarray df_model N/A sp_exog N/A N/A sparse lil_matrix N/A N/A int N/A N/A self nobs M N/A int N/A N/A np sum N/A N/A self df_model 1 N/A N/A self _cols N/A N/A np cumsum N/A N/A np hstack N/A 0 N/A N/A self df_model 1 N/A i N/A range M N/A N/A N/A sp_exog N/A N/A N/A i N/A self nobs N/A N/A i 1 N/A self nobs N/A N/A N/A self _cols N/A i N/A N/A self _cols N/A N/A i 1 N/A N/A sys N/A 1 2 N/A i N/A N/A self sp_exog N/A N/A sp_exog tocsr N/A N/A N/A np any sigma N/A N/A sigma N/A N/A np asarray sigma N/A N/A N/A sigma None N/A N/A resids N/A N/A i N/A range M N/A N/A N/A N/A resids append N/A N/A N/A N/A GLS N/A endog N/A i N/A exog N/A N/A N/A N/A N/A self _cols N/A i N/A N/A self _cols N/A N/A i 1 fit resid N/A resids N/A N/A N/A N/A np asarray resids reshape M -1 N/A sigma N/A N/A self _compute_sigma resids N/A N/A self sigma sigma N/A N/A self cholsigmainv N/A N/A N/A N/A np linalg cholesky N/A N/A N/A np linalg pinv N/A self sigma T N/A N/A N/A self initialize N/A initialize N/A N/A self N/A N/A N/A N/A self wendog N/A N/A self whiten N/A self endog N/A N/A self wexog N/A N/A self whiten N/A self sp_exog N/A N/A self pinv_wexog N/A N/A N/A np linalg pinv N/A self wexog N/A N/A self normalized_cov_params N/A N/A np dot N/A self pinv_wexog N/A N/A np transpose N/A self pinv_wexog N/A N/A self history N/A params N/A N/A np inf N/A N/A self iterations 0 N/A _update_history N/A N/A self params N/A N/A N/A N/A N/A N/A N/A self history N/A params append params N/A _compute_sigma N/A N/A self resids N/A N/A N/A 
        Computes the sigma matrix and update the cholesky decomposition.
         N/A M N/A self _M N/A nobs N/A self nobs N/A sig N/A N/A np dot resids N/A resids T N/A N/A N/A self _dfk N/A N/A div nobs N/A N/A N/A N/A N/A N/A self _dfk lower dfk1 N/A N/A div N/A N/A np zeros N/A M 2 N/A i N/A range M N/A N/A j N/A range M N/A N/A N/A div N/A N/A i j N/A N/A N/A N/A N/A self df_model N/A i 1 N/A N/A N/A self df_model N/A j 1 N/A 1 2 N/A N/A N/A div reshape M M N/A N/A div N/A N/A np zeros N/A M 2 N/A i N/A range M N/A N/A j N/A range M N/A N/A N/A div N/A N/A i j N/A nobs N/A N/A np max N/A N/A N/A self df_model N/A i 1 N/A N/A N/A self df_model N/A j 1 N/A N/A N/A div reshape M M N/A N/A self cholsigmainv N/A N/A N/A N/A np linalg cholesky N/A N/A N/A np linalg pinv N/A sig div T N/A N/A sig div N/A whiten N/A N/A self X N/A N/A N/A 
        SUR whiten method.

        Parameters
        -----------
        X : list of arrays
            Data to be whitened.

        Returns
        -------
        If X is the exogenous RHS of the system.
        ``np.dot(np.kron(cholsigmainv,np.eye(M)),np.diag(X))``

        If X is the endogenous LHS of the system.

         N/A nobs N/A self nobs N/A N/A X N/A self endog N/A N/A N/A N/A np dot N/A N/A np kron N/A self cholsigmainv N/A N/A np eye nobs N/A N/A X reshape -1 1 N/A N/A N/A X N/A self sp_exog N/A N/A N/A N/A N/A N/A N/A sparse kron N/A self cholsigmainv N/A N/A sparse eye nobs nobs X toarray N/A fit N/A N/A self igls tol maxiter N/A False 1e-05 100 N/A N/A 
        igls : bool
            Iterate until estimates converge if sigma is None instead of
            two-step GLS, which is the default is sigma is None.

        tol : float

        maxiter : int

        Notes
        -----
        This ia naive implementation that does not exploit the block
        diagonal structure. It should work for ill-conditioned `sigma`
        but this is untested.
         N/A N/A N/A N/A np any N/A self sigma N/A N/A N/A self sigma N/A N/A self _compute_sigma N/A self endog N/A self exog N/A M N/A self _M N/A beta N/A N/A np dot N/A self pinv_wexog N/A self wendog N/A N/A N/A self _update_history beta N/A N/A self iterations 1 N/A N/A igls N/A N/A sur_fit N/A SysResults self beta N/A self normalized_cov_params N/A sur_fit N/A conv N/A N/A self history N/A params N/A N/A igls N/A N/A np any N/A N/A N/A np abs N/A N/A conv N/A -2 N/A conv N/A -1 tol N/A N/A self iterations maxiter N/A N/A fittedvalues N/A N/A N/A N/A self sp_exog beta reshape M -1 N/A resids N/A N/A self endog fittedvalues N/A N/A self sigma N/A N/A self _compute_sigma resids N/A N/A self wendog N/A N/A self whiten N/A self endog N/A N/A self wexog N/A N/A self whiten N/A self sp_exog N/A N/A self pinv_wexog N/A N/A N/A np linalg pinv N/A self wexog N/A N/A self normalized_cov_params N/A N/A np dot N/A self pinv_wexog N/A N/A np transpose N/A self pinv_wexog N/A beta N/A N/A np dot N/A self pinv_wexog N/A self wendog N/A N/A N/A self _update_history beta N/A N/A self iterations 1 N/A sur_fit N/A SysResults self beta N/A self normalized_cov_params N/A sur_fit N/A predict N/A N/A self design N/A N/A N/A N/A N/A Sem2SLS N/A object N/A N/A 
    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__ N/A N/A self sys indep_endog instruments N/A None None N/A N/A N/A N/A N/A len sys 2 0 N/A N/A N/A ValueError N/A sys must be a list of pairs of endogenous and exogenous variables.  Got length %s N/A len sys N/A M N/A len N/A sys N/A 1 2 N/A N/A self _M M N/A N/A self endog N/A sys N/A 2 N/A N/A self exog N/A sys N/A 1 2 N/A N/A self _K N/A N/A np_matrix_rank _ N/A _ N/A sys N/A 1 2 N/A N/A self instruments instruments N/A instr_endog N/A N/A N/A N/A N/A instr_endog setdefault _ N/A N/A _ N/A iterkeys indep_endog N/A eq_key indep_endog N/A N/A varcol N/A indep_endog N/A eq_key N/A N/A N/A N/A N/A instr_endog N/A eq_key append N/A N/A N/A self exog N/A eq_key N/A N/A N/A varcol N/A N/A self _indep_endog indep_endog N/A _col_map N/A N/A np cumsum N/A N/A np hstack N/A 0 N/A self _K N/A eq_key indep_endog N/A N/A N/A N/A N/A iter N/A indep_endog N/A eq_key N/A N/A N/A N/A N/A TypeError N/A The values of the indep_exog dict must be iterable. Got type %s for converter %s N/A type del_col N/A N/A self wexog N/A N/A self whiten instr_endog N/A whiten N/A N/A self Y N/A N/A N/A 
        Runs the first stage of the 2SLS.

        Returns the RHS variables that include the instruments.
         N/A wexog N/A N/A indep_endog N/A self _indep_endog N/A instruments N/A self instruments N/A eq N/A range N/A self _M N/A N/A instr_eq N/A N/A Y get eq None N/A newRHS N/A N/A N/A N/A self exog N/A eq copy N/A instr_eq N/A N/A N/A i LHS N/A enumerate instr_eq N/A N/A yhat N/A N/A N/A N/A GLS LHS N/A self instruments fit fittedvalues N/A N/A newRHS N/A N/A N/A N/A N/A indep_endog N/A eq N/A i yhat N/A N/A N/A wexog append newRHS N/A wexog N/A fit N/A N/A self N/A N/A N/A N/A delta N/A N/A wexog N/A self wexog N/A endog N/A self endog N/A j N/A range N/A self _M N/A N/A N/A N/A delta append N/A N/A N/A N/A GLS N/A endog N/A j N/A wexog N/A j fit params N/A delta N/A N/A SysResults N/A LikelihoodModelResults N/A N/A 
    Not implemented yet.
     __init__ N/A N/A self model params normalized_cov_params scale N/A None 1.0 N/A N/A N/A N/A N/A super SysResults self __init__ model params normalized_cov_params scale N/A N/A N/A self _get_results N/A _get_results N/A N/A self N/A N/A N/A N/A N/A