Professional Documents
Culture Documents
Lab 4. Non-Stationarity and Its Testing, Cointegration Testing and Error Correction Model
Lab 4. Non-Stationarity and Its Testing, Cointegration Testing and Error Correction Model
dr Piotr Wjcik
2010/2011
82
84
86
88
90
92
94
96
98
00
02
04
06
From the above figure it is obvious that consumption series is not stationary since it is
increased upward as time changes. However increasing pattern of the series is not always an
indication of non-stationarity. The process might be stationary around the trend line - it is
called deterministic non-stationarity. How can we transform the time series data from nonstationary to stationary? We need to work on differenced series. But will taking first
differences be enough to obtain stationarity (for economic time series most of the time
taking first differences is enough)? To answer that question we need to run a formal test.
The most popular test of non-stationarity (unit root) is the (Augmented) Dickey-Fuller
test with null hypothesis of non-stationarity. In Eviews You can get results for three different
variants of the test: without constant and trend, with constant only and with constant and
trend the middle variant is the most commonly used one.
Whenever conducting any statistical test remember that what one really needs to
know is the null hypothesis and the p-value (probability) of the test statistic. Tests are always
done at some confidence level and whenever the p-value of the test statistic is lower than
assumed confidence level the null hypothesis is rejected. When the opposite is true - pvalue is higher than , the null cannot be rejected (remember that in statistics one never
accepts statistical hypothesis).
Lets run ADF test for consumption series.
1
Macroeconometrics sections
dr Piotr Wjcik
2010/2011
One needs to choose from wide range of tests, select if it will be conducted for
variable in levels, its first or second differences. Then one has to choose whether to include a
constant and/or trend and if the number of lags in test augmentation should be chosen
automatically (based on information criteria) or by user. Lets leave the default settings.
Null Hypothesis: CONS has a unit root
Exogenous: Constant
Lag Length: 8 (Automatic - based on SIC, maxlag=12)
t-Statistic
Prob.*
0.751908
-3.498439
-2.891234
-2.582678
0.9927
Macroeconometrics sections
dr Piotr Wjcik
2010/2011
1.116440
0.739000
0.463000
0.347000
Adj. t-Stat
Prob.*
0.978450
-3.493129
-2.888932
-2.581453
0.9962
Macroeconometrics sections
dr Piotr Wjcik
2010/2011
t-Statistic
Prob.*
-2.753939
-3.498439
-2.891234
-2.582678
0.0688
0.255785
0.739000
0.463000
0.347000
Prob.*
Macroeconometrics sections
dr Piotr Wjcik
2010/2011
-11.33818
-3.493747
-2.889200
-2.581596
0.0000
20,000
10,000
-10,000
-20,000
-30,000
80
82
84
86
88
90
92
94
96
98
00
02
04
06
Exercises 4.1
Exercise 4.1.1
Plot a figure of income (inc) from DHSY.wf1. What conclusions about stationarity can You
draw?
Exercise 4.1.2
Test formally (non)stationarity of income.
Exercise 4.1.3
Test formally (non)stationarity of first differences of income. What is the level of integration
of that series?
Macroeconometrics sections
dr Piotr Wjcik
2010/2011
400,000
300,000
200,000
100,000
0
80
82
84
86
88
90
92
94
CONS
96
98
00
02
04
06
INC
Coefficient
Std. Error
t-Statistic
Prob.
Macroeconometrics sections
dr Piotr Wjcik
2010/2011
INC
C
0.859174
-4527.759
0.003458
947.5534
248.4531
-4.778368
0.0000
0.0000
The coefficients of the regression are parameters of the potential cointegrating vector.
Lets save model residuals (from regression results window select Proc Make Residual
Series) under a default name resid01.
Second step of testing cointegration is checking the stationarity of saved residuals. If
residuals are stationary, there is a cointegrating relationship between analyzed variables. If
residuals are non-stationary - cointegration does not exist. Lets use ADF and KPSS tests again.
Null Hypothesis: RESID01 has a unit root
Exogenous: Constant
Lag Length: 4 (Automatic - based on SIC, maxlag=12)
t-Statistic
Prob.*
-2.348439
-3.496346
-2.890327
-2.582196
0.1591
0.065520
0.739000
0.463000
0.347000
Macroeconometrics sections
dr Piotr Wjcik
2010/2011
A note: the critical values of ADL test for cointegration (applied to residuals from regression)
are different than those for an ADL test for data series. However often the latter are used as
an approximation of the first.
What is the cointegrating vector and how to interpret it?
Exercise 4.2
Test the existence of cointegration between lcons and linc series. Save the residuals from the
cointegrating equation.
where 1 will be interpreted as short run reactions of consumption to changes in income and
2 will show the speed of return in direction of the long run relationship in case of shocks.
Therefore 2 is expected to be negative. Parameter is a part of cointegrating vector and in
fact instead of (const41inct4) we will use the residuals saved in the Engle-Granger
cointegration testing procedure.
Lets estimate the model. First we generate new variables using command window:
genr d4cons=cons-cons(-4)
genr d4inc=inc-inc(-4)
And estimate the equation using resid01 (residuals from regression of consumption on
income):
Quick Es8mate equa8on
d4cons d4inc resid01(-4) c
Dependent Variable: D4CONS
Method: Least Squares
Date: XX/XX/XX Time: XX:XX
Sample (adjusted): 1981Q1 2006Q2
Included observations: 102 after adjustments
Variable
Coefficient
Std. Error
t-Statistic
Prob.
D4INC
0.809292
0.014721
54.97558
0.0000
Macroeconometrics sections
dr Piotr Wjcik
2010/2011
RESID01(-4)
C
-0.247943
794.4788
R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
F-statistic
Prob(F-statistic)
0.067714
342.9067
0.968726
0.968094
2718.707
7.32E+08
-949.8162
1533.269
0.000000
-3.661614
2.316895
0.0004
0.0226
12512.98
15220.38
18.68267
18.75988
18.71393
1.376130
The model seems to be correct as the coefficient at error correction term is negative
and statistically significant. However, the value of Durbin Watson statistic is quite low
(1.376130), suggesting positive first order autocorrelation of residuals. The easiest solution
would be to add autoregression to the model, so include among independent variables the
lagged value(s) of consumption differential or lagged error terms (assuming autoregressive
residual structure). Lets estimate below model:
Coefficient
Std. Error
t-Statistic
Prob.
D4INC
RESID01(-4)
C
AR(1)
0.799382
-0.159899
964.3709
0.367881
0.019522
0.061641
493.4736
0.099494
40.94716
-2.594017
1.954250
3.697506
0.0000
0.0110
0.0536
0.0004
R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
F-statistic
Prob(F-statistic)
0.972255
0.971396
2582.178
6.47E+08
-934.7673
1133.022
0.000000
12421.01
15267.78
18.58945
18.69302
18.63138
1.981408
Macroeconometrics sections
dr Piotr Wjcik
2010/2011
Inverted AR Roots
.37
How to interpret the results? Is AR(1) term enough to get rid of autocorrelation in residuals?
Does the error correction mechanism exist?
Exercise 4.3
Estimate ECM model for log consumption and log income and interpret the results.
10