linearmodels.system.model.SUR

class SUR(equations, *, sigma=None)[source]

Seemingly unrelated regression estimation (SUR/SURE)

Parameters
equationsdict

Dictionary-like structure containing dependent and exogenous variable values. Each key is an equations label and must be a string. Each value must be either a tuple of the form (dependent, exog, [weights]) or a dictionary with keys ‘dependent’ and ‘exog’ and the optional key ‘weights’.

sigmaarray_like

Prespecified residual covariance to use in GLS estimation. If not provided, FGLS is implemented based on an estimate of sigma.

Notes

Estimates a set of regressions which are seemingly unrelated in the sense that separate estimation would lead to consistent parameter estimates. Each equation is of the form

\[y_{i,k} = x_{i,k}\beta_i + \epsilon_{i,k}\]

where k denotes the equation and i denoted the observation index. By stacking vertically arrays of dependent and placing the exogenous variables into a block diagonal array, the entire system can be compactly expressed as

\[Y = X\beta + \epsilon\]

where

\[\begin{split}Y = \left[\begin{array}{x}Y_1 \\ Y_2 \\ \vdots \\ Y_K\end{array}\right]\end{split}\]

and

\[\begin{split}X = \left[\begin{array}{cccc} X_1 & 0 & \ldots & 0 \\ 0 & X_2 & \dots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \dots & X_K \end{array}\right]\end{split}\]

The system OLS estimator is

\[\hat{\beta}_{OLS} = (X'X)^{-1}X'Y\]

When certain conditions are satisfied, a GLS estimator of the form

\[\hat{\beta}_{GLS} = (X'\Omega^{-1}X)^{-1}X'\Omega^{-1}Y\]

can improve accuracy of coefficient estimates where

\[\Omega = \Sigma \otimes I_N\]

where \(\Sigma\) is the covariance matrix of the residuals.

SUR is a special case of 3SLS where there are no endogenous regressors and no instruments.

Methods

add_constraints(self, r, q, NoneType] = None)

Add parameter constraints to a model.

fit(self, \*, method, NoneType] = None, …)

Estimate model parameters

from_formula(formula, Dict[str, str]], data, …)

Specify a SUR using the formula interface

multivariate_ls(dependent, …)

Interface for specification of multivariate regression models

predict(self, params, …)

Predict values for additional data

reset_constraints(self)

Remove all model constraints

Properties

constraints

Model constraints

formula

Set or get the formula used to construct the model

has_constant

Vector indicating which equations contain constants

param_names

Model parameter names