var2vec
Convert VAR model to VEC model
Syntax
Description
[
returns the coefficient matrices and the
error-correction coefficient matrix of the vector error-correction model equivalent
to the vector autoregressive model with input coefficient matrices. If the number of
lags in the input vector autoregressive model is p, then the
number of lags in the output vector error-correction model is q =
p – 1.VEC
,C
]
= var2vec(VAR
)
Examples
Input Arguments
Output Arguments
More About
Tips
If any of the time series in a vector autoregression (VAR) model are cointegrated, then the VAR model is nonstationary. You can determine the error-correction coefficient by converting the VAR model to a vector error-correction (VEC) model. The error-correction coefficient matrix determines, on average, how the time series react to deviations from their long-run averages. The rank of the error-correction coefficient determines how many cointegrating relations there exist in the model.
Because
estimate
is suitable for estimating VAR models in reduced form, you can convert an estimated VAR model to its VEC model equivalent usingvar2vec
.To accommodate structural VAR models, specify the input argument
VAR
as aLagOp
lag operator polynomial.To access the cell vector of the lag operator polynomial coefficients of the output argument
VEC
, entertoCellArray(VEC)
.To convert the model coefficients of the output argument from lag operator notation to the model coefficients in difference-equation notation, enter
VECDEN = toCellArray(reflect(VEC));
VECDEN
is a cell vector containing p coefficients corresponding to the differenced response terms inVEC.Lags
in difference-equation notation. The first element is the coefficient of Δyt, the second element is the coefficient of Δyt–1, and so on.Consider converting a VAR(p) model to a VEC(q) model. If the error-correction coefficient matrix (
C
) has:Rank zero, then the converted VEC model is a stable VAR(p – 1) model in terms of Δyt.
Full rank, then the VAR(p) model is stable (i.e., has no unit roots) [2].
Rank r, such that 0 < r < n, then the stable VEC model has r cointegrating relations.
The constant offset of the converted VEC model is the same as the constant offset of the VAR model.
Algorithms
var2vec
does not impose stability requirements on the coefficients. To check for stability, useisStable
.isStable
requires aLagOp
lag operator polynomial as an input argument. For example, to check whetherVAR
, the cell array ofn
-by-n
numeric matrices, composes a stable time series, entervarLagOp = LagOp([eye(n) VAR]); isStable(varLagOp)
A
0
indicates that the polynomial is not stable.
References
[1] Hamilton, J. D. Time Series Analysis. Princeton, NJ: Princeton University Press, 1994.
[2] Lutkepohl, H. "New Introduction to Multiple Time Series Analysis." Springer-Verlag, 2007.
Version History
Introduced in R2015b