Documentation

vartovec

(Not recommended) Vector autoregression (VAR) to vector error-correction model (VEC)

Syntax

[VEC,C] = vartovec(VAR)

Description

    Note:   vartovec will be removed in a future release. Use var2vec instead.

Given a vector autoregression (VAR) model, [VEC,C] = vartovec(VAR) converts VAR to an equivalent vector error-correction (VEC) model. A VAR(p) model of a time series y(t) has the form:

A0y(t)=A1y(t1)+...+Apy(tp)+ε(t)

The equivalent VEC(q) model, with q = p − 1, has the form:

B0z(t)=B1z(t1)+...+Bqz(tq)+Cy(t1)+ε(t)

where z(t) = y(t) − y(t − 1) and C is the error-correction coefficient.

Input Arguments

VAR

The VAR(p) model to be converted to an equivalent VEC(q) model, with q = p − 1. VAR is specified by a (p + 1)-element cell vector of square matrices {A0 A1 ... Ap} associated with coefficients at lags 0, 1, ..., p. To represent a univariate model, VAR may be specified as a double-precision vector. Alternatively, VAR may be specified as a LagOp object or a vgxset object.

Output Arguments

VEC

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

C

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

More About

collapse all

Algorithms

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

    (A0A1L...ApLp)y(t)=A(L)y(t)=ε(t)

    The equivalent VEC(q) model has the form:

    (B0B1L...BqLq)z(t)=B(L)z(t)=Cy(t1)+ε(t)

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

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

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.

See Also

| | |

Introduced in R2011a

Was this topic helpful?