linearmodels.system.model.SUR.multivariate_ls¶
- classmethod SUR.multivariate_ls(dependent, exog)[source]¶
Interface for specification of multivariate regression models
- Parameters:
- dependentarray_like
nobs by ndep array of dependent variables
- exogarray_like
nobs by nvar array of exogenous regressors common to all models
- Returns:
- model
SUR
Model instance
- model
Notes
Utility function to simplify the construction of multivariate regression models which all use the same regressors. Constructs the dictionary of equations from the variables using the common exogenous variable.
Examples
A simple CAP-M can be estimated as a multivariate regression
>>> from linearmodels.datasets import french >>> from linearmodels.system import SUR >>> data = french.load() >>> portfolios = data[["S1V1","S1V5","S5V1","S5V5"]] >>> factors = data[["MktRF"]].copy() >>> factors["alpha"] = 1 >>> mod = SUR.multivariate_ls(portfolios, factors)
- Return type: