In time series econometrics, cointegration is a critical concept. It establishes a long-run equilibrium relationship between two or more non-stationary time series variables, meaning that even if they drift apart in the short run, they will eventually move back toward a shared, stable relationship.
EViews, a popular statistical software package, provides powerful tools, primarily the Johansen Cointegration Test, to detect this relationship. This guide walks you through the necessary pre-tests and the steps for performing the test in EViews.
Phase 1: Pre-Testing—Checking for Unit Roots
Before you can test for cointegration, you must confirm that all your variables are non-stationary and are integrated of the same order, typically I(1) (stationary after one difference). If the variables are stationary at their levels (I(0)), you do not need a cointegration test; you can proceed directly with standard Ordinary Least Squares (OLS) regression.
1. Perform the Unit Root Test (ADF)
- Open the Series: In your EViews workfile, double-click on a variable (e.g., Y).
- View Unit Root Test: Go to View → Unit Root Test…
- Specify the Test:
- Test Type: Select Augmented Dickey-Fuller (ADF).
- Test for Unit Root in: Select Level.
- Exogenous Variables: Choose the option that best fits your data plot (usually Intercept and Trend for the most general case, or just Intercept).
- Interpret the Result:
- The Null Hypothesis (H0) is that a unit root exists (the series is non-stationary).
- If the ADF Test Statistic is less than the critical values (e.g., at the 5% level), you reject H0. This means the variable is I(0) (stationary at level).
- If you fail to reject H0 (the statistic is greater than the critical values), the variable is non-stationary. Repeat the test on the 1st difference of the series. If you reject H0 at the first difference, the variable is I(1).
Crucial Requirement: The cointegration test is valid only if all variables are found to be I(1).
Phase 2: Determining the Optimal Lag Length
Cointegration tests are sensitive to the number of lags included. You must determine the optimal lag length for the underlying Vector Autoregression (VAR) model first.
- Create a VAR: Select all your I(1) variables (e.g., Y, X1, X2) by holding down Ctrl and clicking on them in the workfile.
- Open as VAR: Right-click on the selected variables and choose Open → as VAR…
- Specify the VAR: Select Unrestricted VAR and click OK.
- Lag Selection: In the VAR window, go to View → Lag Structure → Lag Length Criteria…
- Run the Test: Input a reasonable maximum lag (e.g., 4 or 8, depending on your data frequency).
- Find Optimal Lag (p): Look at the table output. The lag that corresponds to the lowest value for most of the criteria (AIC, SC (Schwarz criterion), HQ (Hannan-Quinn)) is your optimal lag length, denoted as p.
Phase 3: Performing the Johansen Cointegration Test
The Johansen procedure tests for the number of cointegrating relationships (or the cointegration rank, r).
1. Access the Cointegration Test Dialog
- Open the VAR: Use the same VAR object you created in Phase 2.
- Access the Test: Go to View → Cointegration Test…
2. Configure the Test Specifications
A dialog box will appear requiring several important choices:
- Variables List: Ensure all your I(1) variables are correctly listed.
- Lag Intervals for First Differences: Set the lag interval to be 1 to p, where p is the optimal lag length you found in Phase 2. If your optimal lag was, say, 3, you would enter 1 3.
- Exogenous Variables: You will specify the deterministic trend assumption. This is perhaps the most critical choice:
- Case 2: Intercept (no trend in levels): Appropriate if the variables exhibit no trend but may have an intercept in the long-run equation. (The most common choice).
- Case 3: Intercept and Trend: Appropriate if the variables exhibit a linear trend.
3. Interpret the Results
EViews will generate two main tables using two different statistics: the Trace Statistic and the Maximum Eigenvalue Statistic. Both test the null hypothesis (H0) of a specific number of cointegrating vectors against an alternative hypothesis (H1).
Column | Description | Null Hypothesis (H0) | Alternative Hypothesis (H1) |
Hypothesized No. of CE(s) | r (the cointegration rank) | The number of cointegrating vectors is less than or equal to r (r≤r0) | The number of cointegrating vectors is greater than r (r>r0) |
Trace Statistic | Likelihood Ratio test statistic. | ||
Max-Eigen Statistic | Likelihood Ratio test statistic. | The number of cointegrating vectors is exactly r (r=r0) | The number of cointegrating vectors is r+1 (r=r0+1) |
0.05 Critical Value | The critical value for the 5% significance level. | ||
Prob. | The p-value for the test. |
Export to Sheets
Decision Rule:
- Reject H0 if the Statistic (Trace or Max-Eigen) is greater than the Critical Value OR if the Prob. value is less than 0.05 (at the 5% level).
- Start testing from the first row, where r=0. Continue down the table until you fail to reject H0. The row immediately above the one where you failed to reject H0 gives you the number of cointegrating vectors.
Example Interpretation:
If you reject H0 at r=0 and r≤1, but fail to reject at r≤2, you conclude there are 2 cointegrating vectors among the variables.
Phase 4: Post-Cointegration Analysis
If you find evidence of cointegration (r≥1), you can then proceed to estimate the long-run and short-run dynamics of the system using a Vector Error Correction Model (VECM), which is derived directly from the cointegration results in EViews. If you find no cointegration (r=0), you should proceed with a simple VAR model on the differenced variables.