summarize
Display estimation results of vector error-correction (VEC) model
Description
summarize(
displays a summary of the VEC(p – 1) model Mdl
)Mdl
.
If
Mdl
is an estimated VEC model returned byestimate
, thensummarize
prints estimation results to the MATLAB® Command Window. The display includes an estimation summary and a table of parameter estimates with corresponding standard errors, t statistics, and p-values. The estimation summary includes fit statistics, such as the Akaike Information Criterion (AIC), and the estimated innovations covariance and correlation matrices.If
Mdl
is an unestimated VEC model returned byvecm
, thensummarize
prints the standard object display (the same display thatvecm
prints during model creation).
Examples
Fit VEC(1) Model to Matrix of Response Data
Fit a VEC(1) model to seven macroeconomic series. Supply the response data as a numeric matrix.
Consider a VEC model for the following macroeconomic series:
Gross domestic product (GDP)
GDP implicit price deflator
Paid compensation of employees
Nonfarm business sector hours of all persons
Effective federal funds rate
Personal consumption expenditures
Gross private domestic investment
Suppose that a cointegrating rank of 4 and one short-run term are appropriate, that is, consider a VEC(1) model.
Load the Data_USEconVECModel
data set.
load Data_USEconVECModel
For more information on the data set and variables, enter Description
at the command line.
Determine whether the data needs to be preprocessed by plotting the series on separate plots.
figure tiledlayout(2,2) nexttile plot(FRED.Time,FRED.GDP); title("Gross Domestic Product"); ylabel("Index"); xlabel("Date"); nexttile plot(FRED.Time,FRED.GDPDEF); title("GDP Deflator"); ylabel("Index"); xlabel("Date"); nexttile plot(FRED.Time,FRED.COE); title("Paid Compensation of Employees"); ylabel("Billions of $"); xlabel("Date"); nexttile plot(FRED.Time,FRED.HOANBS); title("Nonfarm Business Sector Hours"); ylabel("Index"); xlabel("Date");
figure tiledlayout(2,2) nexttile plot(FRED.Time,FRED.FEDFUNDS) title("Federal Funds Rate") ylabel("Percent") xlabel("Date") nexttile plot(FRED.Time,FRED.PCEC) title("Consumption Expenditures") ylabel("Billions of $") xlabel("Date") nexttile plot(FRED.Time,FRED.GPDI) title("Gross Private Domestic Investment") ylabel("Billions of $") xlabel("Date")
Stabilize all series, except the federal funds rate, by applying the log transform. Scale the resulting series by 100 so that all series are on the same scale.
FRED.GDP = 100*log(FRED.GDP); FRED.GDPDEF = 100*log(FRED.GDPDEF); FRED.COE = 100*log(FRED.COE); FRED.HOANBS = 100*log(FRED.HOANBS); FRED.PCEC = 100*log(FRED.PCEC); FRED.GPDI = 100*log(FRED.GPDI);
Create a VEC(1) model using the shorthand syntax. Specify the variable names.
Mdl = vecm(7,4,1); Mdl.SeriesNames = FRED.Properties.VariableNames
Mdl = vecm with properties: Description: "7-Dimensional Rank = 4 VEC(1) Model with Linear Time Trend" SeriesNames: "GDP" "GDPDEF" "COE" ... and 4 more NumSeries: 7 Rank: 4 P: 2 Constant: [7×1 vector of NaNs] Adjustment: [7×4 matrix of NaNs] Cointegration: [7×4 matrix of NaNs] Impact: [7×7 matrix of NaNs] CointegrationConstant: [4×1 vector of NaNs] CointegrationTrend: [4×1 vector of NaNs] ShortRun: {7×7 matrix of NaNs} at lag [1] Trend: [7×1 vector of NaNs] Beta: [7×0 matrix] Covariance: [7×7 matrix of NaNs]
Mdl
is a vecm
model object. All properties containing NaN
values correspond to parameters to be estimated given data.
Estimate the model using the entire data set and the default options.
EstMdl = estimate(Mdl,FRED.Variables)
EstMdl = vecm with properties: Description: "7-Dimensional Rank = 4 VEC(1) Model" SeriesNames: "GDP" "GDPDEF" "COE" ... and 4 more NumSeries: 7 Rank: 4 P: 2 Constant: [14.1329 8.77841 -7.20359 ... and 4 more]' Adjustment: [7×4 matrix] Cointegration: [7×4 matrix] Impact: [7×7 matrix] CointegrationConstant: [-28.6082 -109.555 77.0912 ... and 1 more]' CointegrationTrend: [4×1 vector of zeros] ShortRun: {7×7 matrix} at lag [1] Trend: [7×1 vector of zeros] Beta: [7×0 matrix] Covariance: [7×7 matrix]
EstMdl
is an estimated vecm
model object. It is fully specified because all parameters have known values. By default, estimate
imposes the constraints of the H1 Johansen VEC model form by removing the cointegrating trend and linear trend terms from the model. Parameter exclusion from estimation is equivalent to imposing equality constraints to zero.
Display a short summary from the estimation.
results = summarize(EstMdl)
results = struct with fields:
Description: "7-Dimensional Rank = 4 VEC(1) Model"
Model: "H1"
SampleSize: 238
NumEstimatedParameters: 112
LogLikelihood: -1.4939e+03
AIC: 3.2118e+03
BIC: 3.6007e+03
Table: [133x4 table]
Covariance: [7x7 double]
Correlation: [7x7 double]
The Table
field of results
is a table of parameter estimates and corresponding statistics.
Compare Several VEC Model Fits
Consider the model and data in Fit VEC(1) Model to Matrix of Response Data and these four alternative VEC models: VEC(0), VEC(1), VEC(3), and VEC(7). Using historical data, estimate each of the four models, and then compare the model fits using the resulting Bayesian Information Criterion (BIC).
Load the Data_USEconVECModel
data set and preprocess the data.
load Data_USEconVECModel
FRED.GDP = 100*log(FRED.GDP);
FRED.GDPDEF = 100*log(FRED.GDPDEF);
FRED.COE = 100*log(FRED.COE);
FRED.HOANBS = 100*log(FRED.HOANBS);
FRED.PCEC = 100*log(FRED.PCEC);
FRED.GPDI = 100*log(FRED.GPDI);
Within a loop:
Create a VEC model using the shorthand syntax.
Estimate the VEC Model. Reserve the maximum value of p as presample observations.
Store the estimation results.
numlags = [0 1 3 7]; p = numlags + 1; Y0 = FRED{1:max(p),:}; Y = FRED{((max(p) + 1):end),:}; for j = 1:numel(p) Mdl = vecm(7,4,numlags(j)); EstMdl = estimate(Mdl,Y,'Y0',Y); results(j) = summarize(EstMdl); end
results
is a 4-by-1 structure array containing the estimation results of each model.
Extract the BIC from each set of results.
BIC = [results.BIC]
BIC = 1×4
103 ×
5.3948 5.4372 5.8254 6.5536
The model corresponding to the lowest BIC has the best fit among the models considered. Therefore, the VEC(0) model is the best fitting model.
Input Arguments
Output Arguments
results
— Model summary
structure array | vecm
model object
Model summary, returned as a structure array or a vecm
model object.
If
Mdl
is an estimated VEC model, thenresults
is a structure array containing the fields in this table.Field Description Description
Model summary description (string) Model
Johansen model of deterministic terms ( "H2"
,"H1*"
,"H1"
,"H*"
,"H"
) [1]SampleSize
Effective sample size (numeric scalar) NumEstimatedParameters
Number of estimated parameters (numeric scalar) LogLikelihood
Optimized loglikelihood value (numeric scalar) AIC
Akaike Information Criterion (numeric scalar) BIC
Bayesian Information Criterion (numeric scalar) Table
Parameter estimates with corresponding standard errors, t statistics (estimate divided by standard error), and p-values (assuming normality); a table with rows corresponding to model parameters Covariance
Estimated residual covariance matrix (the maximum likelihood estimate), an Mdl.NumSeries
-by-Mdl.NumSeries
numeric matrix with rows and columns corresponding to the innovations in the response equations ordered by the columns ofY
Correlation
Estimated residual correlation matrix whose dimensions correspond to the dimensions of Covariance
summarize
usesmvregress
to implement multivariate normal, maximum likelihood estimation. For more details on estimates and standard errors, see Estimation of Multivariate Regression Models.If
Mdl
is an unestimated VEC model, thenresults
is avecm
model object that is equal toMdl
.
References
[1] Johansen, S. Likelihood-Based Inference in Cointegrated Vector Autoregressive Models. Oxford: Oxford University Press, 1995.
Version History
Introduced in R2017b
See Also
Objects
Functions
Comando MATLAB
Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi MATLAB.
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)