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:


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:


Input Arguments


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.


The error-correction coefficient. C is a square matrix the same size as the coefficients of the associated VEC.

Output Arguments


The VAR representation of the input VEC model. The data type and orientation of VAR is consistent with that of VEC.


Convert a VEC Model to a VAR Model

Specify a VEC(1) model of time series yt:


The first-order lag coefficient is:


The error-correction coefficient is:


Enter the coefficients from the difference equation (including the identity for B0) 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 A0, A1, and A2:

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:


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.

More About

expand all


  • Written as a polynomial in the lag operator Ly(t) = y(t − 1), a VEC(q) model has the form:


    The equivalent VAR(p) model has the form:


    Thus, if VEC is specified as a LagOp object B, coefficients of lagged values of z(t) must be represented by the opposite of their values in standard difference-equation form. The output, VAR, will follow a similar sign convention.

  • If VEC is specified as a vgxset object, the conversion involves only the AR0, AR, and nAR components of the model. Other model components are unaffected.


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

See Also

| |

Was this topic helpful?