# Vector Error Correction and VAR Models

Consider two time-series variables, yt and xt. Generalizing the discussion about dynamic rela­tionships in chapter 9 to these two interrelated variables yield a system of equations:

yt =віо + Piiyt-i + ві2Х*-і + (13.1)

xt =в20 + ^2iyt-1 + ^22Xt-1 + Vе (13.2)

The equations describe a system in which each variable is a function of its own lag, and the lag of the other variable in the system. Together the equations constitute a system known as a vector autoregression (VAR). In this example, since the maximum lag is of order one, we have a VAR(1).

If y and x are stationary, the system can be estimated using least squares applied to each equation. If y and x are not stationary in their levels, but stationary in differences (i. e., I(1)), then take the differences and estimate:

Ayt =6iiAyt-i + finAxt-1 + vtAy (13.3)

Axt =^2iAyt-i + ^22 Axt-1 + vfx (13.4)

using least squares. If y and x are I(1) and cointegrated, then the system of equations can be modified to allow for the cointegrating relationship between the I(1) variables. Introducing the cointegrating relationship leads to a model known as the vector error correction (VEC) model.

In this example from POE4, we have macroeconomic data on real GDP for a large and a small economy; usa is real quarterly GDP for the United States and aus is the corresponding series for Australia. The data are found in the gdp. gdt dataset and have already been scaled so that both economies show a real GDP of 100 in the year 2000. We decide to use the vector error correction model because (1) the time-series are not stationary in their levels but are in their differences (2) the variables are cointegrated.

In an effort to keep the discussion moving, the authors of POE4 opted to avoid discussing how they actually determined the series were nonstationary in levels, but stationary in differences. This is an important step and I will take some time here to explain how one could approach this. There are several ways to do this and I’ll show you two ways to do it in gretl.