linearmodels.system.model.SUR.multivariate_ls¶
- classmethod SUR.multivariate_ls(dependent: ndarray | DataArray | DataFrame | Series, exog: ndarray | DataArray | DataFrame | Series) linearmodels.system.model.SUR [source]¶
Interface for specification of multivariate regression models
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)