Documentation

varm

Convert vector error-correction (VEC) model to vector autoregression (VAR) model

Syntax

varmdl= varm(MDL)

描述

example

varmdl= varm(MDL)converts the VEC(p- 1)模型MDLto its equivalent VAR(p) model representationvarmdl

例子

全部收缩

考虑以下七个宏观经济系列的VEC模型。

  • 国内生产总值(GDP)

  • GDP implicit price deflator

  • Paid compensation of employees

  • 不nfarm business sector hours of all persons

  • 有效的联邦资金利率

  • 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.

加载Data_USEconVECModeldata set.

loadData_USEconVECModel

为了more information on the data set and variables, enter描述at the command line.

Determine whether the data needs to be preprocessed by plotting the series on separate plots.

figure; subplot(2,2,1) plot(FRED.Time,FRED.GDP); title('国内生产总值');ylabel('指数');xlabel('Date');子图(2,2,2)图(Fred.Time,Fred.gdpdef);标题('GDP平减指数');ylabel('指数');xlabel('Date');subplot(2,2,3) plot(FRED.Time,FRED.COE); title(“付费雇员赔偿”);ylabel('Billions of $');xlabel('Date');subplot(2,2,4) plot(FRED.Time,FRED.HOANBS); title(“非农业商业部门小时”);ylabel('指数');xlabel('Date');figure; subplot(2,2,1) plot(FRED.Time,FRED.FEDFUNDS); title(“联邦资金利率”);ylabel(“百分比”);xlabel('Date');子图(2,2,2)图(Fred.Time,Fred.pcec);标题('Consumption Expenditures');ylabel('Billions of $');xlabel('Date');subplot(2,2,3) 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);

使用速记语法创建VEC(1)模型。指定变量名。

MDL= vecm(7,4,1); Mdl.SeriesNames = FRED.Properties.VariableNames
mdl =带有属性的VECM:描述:“ 7维等级= 4 vec(1)具有线性时间趋势“系列名称”:“ GDP”“ GDPDEF”“ GDPDEF”“ COE” ...和4个NumSeries:7等级:4 P:4 P:2常数:[7×1 nans]调整:[NAN的NAN的7×4矩阵]协整:[NANS的7×4矩阵]撞击:[NANS的7×7矩阵] cOintegrationConcontant:[NANS 4×1矢量] conetegrationTrend:[Nans的4×1矢量] shortrun:lag [1]趋势{7×7 nans}矩阵}:[NANS的7×1矢量] beta:[7×0矩阵]协方差:[7×7×7Nans的矩阵]

MDLis avecm模型对象。所有包含的属性NaNvalues correspond to parameters to be estimated given data.

使用整个数据集和默认选项估算模型。

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是估计的vecm模型对象。It is fully specified because all parameters have known values. By default,estimateimposes 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.

Convert the estimated VEC(1) model to its equivalent VAR(2) model representation.

varmdl= varm(EstMdl)
varmdl= varm with properties: Description: "AR-Nonstationary 7-Dimensional VAR(2) Model" SeriesNames: "GDP" "GDPDEF" "COE" ... and 4 more NumSeries: 7 P: 2 Constant: [14.1329 8.77841 -7.20359 ... and 4 more]' AR: {7×7 matrices} at lags [1 2] Trend: [7×1 vector of zeros] Beta: [7×0 matrix] Covariance: [7×7 matrix]

varmdlis avarm模型对象。

Input Arguments

全部收缩

VEC model, specified as avecmmodel object created byvecm或者estimateMDL必须完全指定。

Output Arguments

全部收缩

VAR model equivalent, returned as avarm模型对象。

算法

考虑一下m-dimensional VEC(p- 1)使用滞后运算符表示法模型。

( 1 L ) y t = c + d t + π y t 1 + j = 1 p 1 φ j ( 1 L ) y t j + β x t + ε t

  • yt是一个m-1值向对应的值m时间的响应变量t, 在哪里t= 1,...,T

  • Lyt=yt- 1

  • c是总体常数。

  • dis the overall time trend coefficient.

  • π是一个m-经过-m影响矩阵等级r

  • xtis ak-1值向对应的值k外源预测变量。

  • β是一个m-经过-kmatrix of regression coefficients.

  • εt是一个m- 随机高斯创新的by-1矢量,每种均值为0,共同m-经过-m协方差矩阵σ。为了ts,εtεs是独立的。

  • φj是一个m-经过-mmatrix of short-run coefficients.

等效var(p) model in difference equation notation is

y t = c + d t + j = 1 p γ j y t j + β x t + ε t

γj是一个m-经过-m自回旋系数的矩阵。

See Also

Using Objects

Functions

Introduced in R2017b

这个话题有帮助吗?