MATLAB Examples

# Determine Cointegration Rank of VEC Model

This example shows how to convert an n-dimensional VAR model to a VEC model, and then compute and interpret the cointegration rank of the resulting VEC model.

The rank of the error-correction coefficient matrix, C, determines the cointegration rank. If rank(C) is:

• Zero, then the converted VEC(p) model is a stationary VAR(p - 1) model in terms of , without any cointegration relations.
• n, then the VAR(p) model is stable in terms of .
• The integer r such that , then there are cointegrating relations. That is, there are linear combinations that comprise stationary series. You can factor the error-correction term into the two n-by- r matrices . contains the adjustment speeds, and the cointegration matrix. This factorization is not unique.

For more details, see docid:econ_ug.bswxu_6-1 and docid:econ_ug.brz_lcd, Chapter 6.3.

Consider the following VAR(2) model.

Create the variables A1 and A2 for the autoregressive coefficients. Pack the matrices into a cell vector.

A1 = [1 0.26 0; -0.1 1 0.35; 0.12 -0.5 1.15]; A2 = [-0.2 -0.1 -0.1; 0.6 -0.4 -0.1; -0.02 -0.03 -0.1]; Var = {A1 A2}; 

Compute the autoregressive and error-correction coefficient matrices of the equivalent VEC model.

[Vec,C] = var2vec(Var); 

Because the degree of the VAR model is 2, the resulting VEC model has degree . Hence, Vec is a one-dimensional cell array containing the autoregressive coefficient matrix.

Determine the cointegration rank by computing the rank of the error-correction coefficient matrix C.

r = rank(C) 
r = 2 

The cointegrating rank is 2. This result suggests that there are two independent linear combinations of the three variables that are stationary.