Logo

statsmodels.sandbox.sysreg.SUR

class statsmodels.sandbox.sysreg.SUR(sys, sigma=None, dfk=None)[source]

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.

Notes

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

System Message: WARNING/2 (\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] )

latex exited with error [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=latex) restricted \write18 enabled. entering extended mode (./math.tex LaTeX2e <2011/06/27> Babel <3.9k> and hyphenation patterns for 2 languages loaded. (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo)) (/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty ! LaTeX Error: File `utf8x.def’ not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: def) Enter file name: ! Emergency stop. <read *> l.131 \endinput ^^M No pages of output. Transcript written on math.log.

References

Zellner (1962), Greene (2003)

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

System Message: WARNING/2 (\left[X^{T}\left(\Sigma^{-1}\otimes\boldsymbol{I}\right)X\right]^{-1})

latex exited with error [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=latex) restricted \write18 enabled. entering extended mode (./math.tex LaTeX2e <2011/06/27> Babel <3.9k> and hyphenation patterns for 2 languages loaded. (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo)) (/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty ! LaTeX Error: File `utf8x.def’ not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: def) Enter file name: ! Emergency stop. <read *> l.131 \endinput ^^M No pages of output. Transcript written on math.log.
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.

Methods

fit([igls, tol, maxiter]) igls : bool
initialize()
predict(design)
whiten(X) SUR whiten method.

Previous topic

statsmodels.sandbox.regression.try_catdata.labelmeanfilter_str

Next topic

statsmodels.sandbox.sysreg.SUR.fit

This Page