convert2sur
Convert multivariate normal regression model to seemingly unrelated regression (SUR) model
Description
Examples
This example shows a CAPM demonstration using 6 stocks and 60 months of simulated asset returns, where the model for each stock is AssetReturn = Alpha * 1 + CashReturn + Beta * (MarketReturn - CashReturn) + Noise
and the parameters to estimate are Alpha
and Beta
.
Using simulated data, where the Alpha
estimate(s) are displayed in the first row(s) and the Beta
estimate(s) are display in the second row(s).
Market = (0.1 - 0.04) + 0.17*randn(60, 1); Asset = (0.1 - 0.04) + 0.35*randn(60, 6); Design = cell(60, 1); for i = 1:60 Design{i} = repmat([ 1, Market(i) ], 6, 1); end
Obtain the aggregate estimates for all stocks.
[Param, Covar] = mvnrmle(Asset, Design);
disp({'All 6 Assets Combined'});
{'All 6 Assets Combined'}
disp(Param);
0.0233 0.1050
Estimate parameters for individual stocks using convert2sur
Group = 1:6; DesignSUR = convert2sur(Design, Group); [Param, Covar] = mvnrmle(Asset, DesignSUR); Param = reshape(Param, 2, 6); disp({ 'A', 'B', 'C', 'D', 'E', 'F' });
{'A'} {'B'} {'C'} {'D'} {'E'} {'F'}
disp(Param);
0.0144 0.0270 0.0046 0.0419 0.0376 0.0291 0.3264 -0.1716 0.3248 -0.0630 -0.0001 0.0637
Estimate parameters for pairs of stocks by forming groups.
disp({'A & B', 'C & D','E & F'});
{'A & B'} {'C & D'} {'E & F'}
Group = { [1,2 ],[3,4],[5,6]}; DesignSUR = convert2sur(Design, Group); [Param, Covar] = mvnrmle(Asset, DesignSUR); Param = reshape(Param, 2, 3); disp(Param);
0.0186 0.0190 0.0334 0.0988 0.1757 0.0293
Input Arguments
Data series, specified as a matrix or a cell array that depends on the
number of data series NUMSERIES
.
If
NUMSERIES = 1
,convert2sur
returns theDesign
matrix.If
NUMSERIES > 1
,Design
is a cell array withNUMSAMPLES
cells, where each cell contains aNUMSERIES
-by-NUMPARAMS
matrix of known values.
Data Types: double
| cell
Grouping for data series, specified using separate parameters for each group. Specify groups either by series or by groups:
To identify groups by series, construct an index vector that has
NUMSERIES
elements. Elementi = 1, ..., NUMSERIES
in the vector, and has the indexj = 1, ..., NUMGROUPS
of the group in which series i is a member.To identify groups by groups, construct a cell array with
NUMGROUPS
elements. Each cell contains a vector with the indexes of the series that populate a given group.In either case, the number of series is
NUMSERIES
and the number of groups isNUMGROUPS
, with1
≤NUMGROUPS
≤NUMSERIES
.
Data Types: double
| cell
Output Arguments
Seemingly unrelated regression model with a specified grouping of the data
series, returned as either a matrix or a cell array that depends on the
value of NUMSERIES
.
If
NUMSERIES = 1
,DesignSUR = Design
, which is aNUMSAMPLES
-by-NUMPARAMS
matrix.If
NUMSERIES > 1
andNUMGROUPS
groups are to be formed,Design
is a cell array withNUMSAMPLES
cells, where each cell contains aNUMSERIES
-by-(NUMGROUPS * NUMPARAMS)
matrix of known values.
The original collection of parameters that are common to all series are replicated to form collections of parameters for each group.
More About
Multivariate normal regression is a statistical modeling approach that extends traditional regression techniques to situations where the dependent variable is multivariate, meaning it consists of multiple correlated outcomes.
Multivariate normal regression is particularly useful in fields where researchers are interested in understanding the relationships between several response variables and one or more predictor variables.
The Seemingly Unrelated Regression (SUR) model is a statistical method used in econometrics to estimate multiple regression equations that are related to each other through their error terms.
The SUR model allows for the simultaneous estimation of these equations, taking into account the potential correlation between the error terms of different equations. This can lead to more efficient estimates compared to estimating each equation independently.
Version History
Introduced in R2006a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)