Documentation |
Vector error-correction (VEC) to vector autoregression (VAR)
VAR =
vectovar(VEC,C)
Given a vector error-correction (VEC) model, VAR = vectovar(VEC,C) converts VEC to an equivalent vector autoregression (VAR) model. A VEC(q) model of a time series y(t) has the form:
$${B}_{0}z(t)={B}_{1}z(t-1)+\mathrm{...}+{B}_{q}z(t-q)+Cy(t-1)+\epsilon (t)$$
where z(t) = y(t) − y(t − 1) and C is the error-correction coefficient. The equivalent VAR(p) model with p = q + 1 has the form:
$${A}_{0}y(t)={A}_{1}y(t-1)+\mathrm{...}+{A}_{p}y(t-p)+\epsilon (t)$$
VEC |
The VEC(q) model to be converted to an equivalent VAR(p) model, with p = q + 1. VEC is specified by a (q + 1)-element cell vector of square matrices {B0 B1 ... Bq} associated with coefficients at lags 0, 1, ..., q. To represent a univariate model, VEC may be specified as a double-precision vector. Alternatively, VEC may be specified as a LagOp object or a vgxset object. |
C |
The error-correction coefficient. C is a square matrix the same size as the coefficients of the associated VEC. |
VAR |
The VAR representation of the input VEC model. The data type and orientation of VAR is consistent with that of VEC. |
Specify a VEC(1) model of time series y_{t}:
$$\Delta {y}_{t}={B}_{1}\Delta {y}_{t-1}+C{y}_{t-1}+{\epsilon}_{t}$$
The first-order lag coefficient is:
$${B}_{1}=\left[\begin{array}{cc}0.2& -0.8\\ 0.7& 0.4\end{array}\right]$$
The error-correction coefficient is:
$$C=\left[\begin{array}{cc}-1.3& 1.1\\ -0.5& -1.5\end{array}\right]$$
Enter the coefficients from the difference equation (including the identity for B_{0}) directly into a cell array:
VEC = {eye(2) [0.2 -0.8 ; 0.7 0.4]}; C = [-1.3 1.1 ; -0.5 -1.5];
Use vectovar to convert the VEC(1) model to an equivalent VAR(2) model:
VAR = vectovar(VEC, C);
Since the original VEC model was specified as a cell array, the VAR model is also a cell array. The output cell array contains A_{0}, A_{1}, and A_{2}:
A0 = VAR{1} A1 = VAR{2} A2 = VAR{3}
A0 = 1 0 0 1 A1 = -0.1000 0.3000 0.2000 -0.1000 A2 = -0.2000 0.8000 -0.7000 -0.4000
You can express the same VEC(1) model as a lag operator polynomial:
$$(I-{B}_{1}L)\Delta {y}_{t}=C{y}_{t-1}+{\epsilon}_{t}$$
To specify the VEC(1) model as a lag operator, use the LagOp constructor to create a lag operator polynomial object:
vec = LagOp({eye(2) [-0.2 0.8 ; -0.7 -0.4]});
Use vectovar to convert the VEC(1) model to an equivalent VAR(2) model:
var = vectovar(vec, C);
Since the input model is a lag operator polynomial, so is the output model. The output model uses the same sign convention as the input model. Obtain the coefficient associated with the first and second lags of the VAR model by lag-based indexing:
VARFirstCoeff = var.Coefficients{1} VARSecondCoeff = var.Coefficients{2}
VARFirstCoeff = 0.1000 -0.3000 -0.2000 0.1000 VARSecondCoeff = 0.2000 -0.8000 0.7000 0.4000
See Specify Lag Operator Polynomials for more information on lag operator polynomials.