RATS 11
RATS 11

If we take two series, each of which has a unit root, then, in general, any linear combination of them will also have a unit root. However, it is possible for there to exist a linear combination which is stationary instead. Such series are said to be cointegrated (Engle and Granger, 1987). The textbooks by Hamilton (1994) and Enders (2014) are good references on the subject. Of these, Hamilton is the more theoretical; Enders the more applied. For a more complete discussion, Juselius(2006) is a monograph on the subject which ties directly into the CATS add-on.

 

Cointegration is a property of two or more series. Some examples where cointegration might possibly be seen are

 

\begin{equation} \log Y_t - \log \,C_t \label{eq:test_cointyc} \end{equation}

consumption proportional to income

\begin{equation} \log \,P_t - \log \,S_t - \log \,P_t^* \label{eq:test_cointppp} \end{equation}

purchasing power parity (P’s are prices, S exchange rate)

          

In neither case would we expect these linear combinations to be exactly constant. However, if the variables are cointegrated, we would expect these residuals to stay close to a fixed value if observed over a long span of time. If there were still a unit root in the residuals, we would expect to see them wandering farther away as the sample size increased.

 

Note that before a set of series can be COintegrated, they must be (individually) integrated (\(I(1)\)). This rather important point has been missed by people trying to get results quickly, but not carefully. If one of the input series is stationary, rather than \(I(1)\), you will almost certainly find “cointegration”, because 1 x the stationary series + 0 x the others is a stationary linear combination. There is nothing wrong with including both integrated and stationary variables in an analysis—you just have to understand how they interact when you look at cointegrating rank statistics.

 

As with unit root tests, there are quite a few cointegration testing procedures available with RATS. As with unit root tests, we are somewhat skeptical of the value of much of the empirical work done on cointegration. For analyzing joint behavior of a set of time series in greater detail, we would recommend the program CATS by Dennis, Hansen and Juselius. CATS adopts a structured approach to cointegration, emphasizing the testing of specific restrictions.

 

Most of the testing procedures are based upon a two-step procedure of estimating a cointegrating vector and then performing a stationarity test on the residuals. The result underlying this is that if two variables \(X_{1t}\) and \(X_{2t}\) are cointegrated, then if the regression

\begin{equation} X_{1t} = \alpha X_{2t} + u_t \label{eq:test_cointspurious} \end{equation}

is run, the estimate of \(\alpha\) is not only consistent (even though it disregards possible simultaneous equations bias), but is “superconsistent,” converging to the true value at a faster rate than for a typical regression coefficient (Stock, 1987). But what happens if they aren't cointegrated?

 

Then the estimated coefficient in \eqref{eq:test_cointspurious} is likely to be garbage; this is the “spurious regression” of Granger and Newbold (1974). It’s one thing to test a restriction like \eqref{eq:test_cointyc} or \eqref{eq:test_cointppp} that is rooted in economic theory. It’s quite another to blindly estimate a “cointegrating vector” and to rely upon asymptotic distribution theory to save us from an incorrect inference. If, for instance, we were to estimate the coefficients in \eqref{eq:test_cointppp} and came up with

\begin{equation} \log \,P_t - .05\,\log \,S_t - .50\,\log \,P_t^* \label{eq:test_cointjunk} \end{equation}

and we were able to reject non-cointegration, would we seriously believe that \eqref{eq:test_cointjunk} represents some type of long-term equilibrium condition? We would be on much safer ground reaching the conclusion that this was due to sampling error. After all, we are attempting to infer very long-run behavior of a set of series from a finite sample.

Testing a Known Cointegrating Vector

The simplest test for a known cointegrating vector is a standard unit root test applied to the residual from the hypothesized linear combination of the variables. The test has the same asymptotic distribution as when applied to any other observed series.

 

Example file COINTTEST.RPF is adapted from Hamilton. It examines whether the  Purchasing Power Parity (PPP) restriction \eqref{eq:test_cointppp} is a cointegrating vector for Italian and U.S. data. The first step is testing whether the series are I(1) with Dickey-Fuller tests (all three pass):

 

@dfunit(lags=12,trend) uscpi

@dfunit(lags=12,trend) italcpi

@dfunit(lags=12,trend) exrat

 

The test for PPP being a cointegrating relation is done with:

 

set ppp = uscpi-exrat-italcpi

@dfunit(lags=12) ppp

 

If the variables are cointegrated and we have used the correct cointegrating vector, then this series should fail a unit root test. As this ends up accepting the unit root, we reject the null hypothesis of cointegration.

Testing an Unknown Cointegrating Vector

The simplest testing procedure for cointegration with an unknown cointegrating vector is to apply a unit root test to the residuals from a regression involving the variables. This is the Engle-Granger test. Since the sum of squares of a non-stationary linear combination should be quite a bit higher than those for a stationary linear combination, we would expect that least squares would zero in on a stationary linear combination if it exists. Thus it’s even more important in this case to make sure the input variables are themselves \(I(1)\). Because the coefficients are now estimated, the critical values for the unit root test are different and get more negative the more variables we include in the cointegrating regression. There are two procedures for doing this: @EGTestResids takes as input the residuals from the cointegrating regression. @EGTest takes the set of variables and does the preliminary regression itself.

 

@EGTEST has most of the same options as @DFUNIT but because the number of endogenous variables isn't fixed, they are input to the procedure using a supplementary card. Although it's unlikely to be interesting in this case (for the reasons described above), the Engle-Granger test can be applied to the three series in the example with something like:

 

@egtest(lags=12)

# uscpi italcpi exrat

 

An alternative to the regression-based tests is the likelihood ratio approach, which is the basis for the CATS software. The likelihood approach allows for testing sequentially for the rank of cointegration from 0 (no cointegration, N separate stochastic trends) up to N, which would mean no unit roots. See the discussion in Hamilton or Juselius.

 

The procedure @JOHMLE does the basic Johansen likelihood ratio test. In our example:

 

@johmle(lags=6,det=constant)

# uscpi italcpi exrat

 

DET=CONSTANT is appropriate for this procedure because that means a constant in each equation outside the cointegrating vector, which allows for trends in the variables.

 

The Time Series—Cointegration Test operation provides easy access to several of these testing procedures.

 

CATS Cointegration Analysis Procedures

As noted earlier, if you need to do any kind of comprehensive cointegration testing and analysis, we recommend that you use the CATS (Cointegration Analysis of Time Series) package for RATS.

 

Here is one of the sample programs included with CATS. As you can see, this reads in some data series, does some data transformations, and executes the CATS procedure, specifying the VAR model to be analyzed (CATS automatically transforms the model into error correction form).

 

calendar(m) 1975:1

allocate 2003:12

open data pppuip.xls

data(format=xls,org=obs)

 

log  uscpi  / lp2                       ;* US price level

log  gecpi  / lp1                       ;* German price level

log  exgeus / ls12                      ;* $-DM exchange rate

set  lp1c / = lp1 + 0.02222*(T>=1991:1) ;* post-unification fix

set  ppp  / = 0.01*(lp1c-lp2-ls12)      ;* purchasing power parity

set  b1   / = 0.01*geb/12               ;* German bond rate

set  b2   / = 0.01*usb/12               ;* US bond rate

diff lp1c / dp1c                        ;* German inflation

diff lp2  / dp2                         ;* US inflation

 

@cats(lags=2,season=12,dettrend=cimean)

# Dp1c Dp2 b1 b2 ppp

 

Here’s what the screen looks like after CATS completes its initial set of computations and adds six new menus to the menu bar. We’ve opened the I(1) menu, which contains the primary operations for setting the cointegration rank and testing various restrictions on the model.

 


Copyright © 2025 Thomas A. Doan