You are on page 1of 105

TOPIC 8

INTRODUCTION TO THE ADVANCED


TIME SERIES MODEL

http://rizaudinsahlan.blogspot.my

RIZAUDIN SAHLAN 1
8.1 TESTING FOR UNIT ROOTS
• We now turn to important problem of testing whether a TS
follows a unit root process.
• We had discussed in Topic 2 informal guidelines to decide
whether a series is I(1) or not.
• It is useful to have a formal test for unit root.
• The simplest approach testing unit root begins with AR(1)
model;

𝑦𝑡 = 𝛼 + 𝜌𝑦𝑡−1 + 𝑒𝑡 (8.1.1)

where 𝑦0 is observed initial value. Let 𝑒𝑡 denote a process


that has zero mean, given past observed 𝑦
𝐸 𝑒𝑡 |𝑦𝑡−1 , 𝑦𝑡−2 , . . 𝑦0 = 0 (8.1.2)
RIZAUDIN SAHLAN 2
8.1 TESTING FOR UNIT ROOTS
• If 𝑦𝑡 follows (8.1.2), it has a unit root if 𝜌 = 1.
• If 𝛼 = 0 and 𝜌 = 1, 𝑦𝑡 follows random walk without drift.
• If 𝛼 ≠ 0 and 𝜌 = 1, 𝑦𝑡 follows random walk with drift
which is a linear function of 𝑡.
• Therefore, the null hypothesis is 𝑦𝑡 has a unit root:
𝐻0 : 𝜌 = 1 (8.1.3)
• In almost cases, we are interested in the one-sided alternative
𝐻𝑎 : 𝜌 < 1 (8.1.4)
• In practice, usually we get 0 < 𝜌 < 1. (very rare we get 𝜌 < 0
condition).
• 𝐻𝑎 : 𝜌 > 1 is not usually considered, implies 𝑦𝑡 is explosive.

RIZAUDIN SAHLAN 3
8.1 TESTING FOR UNIT ROOTS
• When 𝜌 < 1, 𝑦𝑡 is stable AR(1) process, which means it is
weakly dependent or asymptotic uncorrelated.
• Therefore, testing (8.1.3) to model (8.1.1), with alternative
hypothesis given (8.1.4) is really a test whether 𝑦𝑡 is I(1)
against the alternative that 𝑦𝑡 is I(0).

• The convenient equation for carrying out the unit root test is
to substract 𝑦𝑡−1 from both sides of (8.1.1) and define
𝜃 = 𝜌 − 1;
𝑦𝑡 − 𝑦𝑡−1 = 𝛼 + 𝜌𝑦𝑡−1 − 𝑦𝑡−1 + 𝑒𝑡
𝑦𝑡 − 𝑦𝑡−1 = 𝛼 + (𝜌 − 1)𝑦𝑡−1 + 𝑒𝑡
∆𝑦𝑡 = 𝛼 + 𝜃𝑦𝑡−1 + 𝑒𝑡 (8.1.5)

RIZAUDIN SAHLAN 4
8.1 TESTING FOR UNIT ROOTS
• Eq(8.5) seems straightforward to test ;

𝐻0 : 𝜃 = 0 against 𝐻1 : 𝜃 < 0

• But the problem is asymptotic standard normal distribution


for the 𝑡 statistics does not apply: 𝑡 statistics does not have as
approximate standard normal distribution even in large
sample.
• Dickey and Fuller (1979) introduced asymptotic distribution of
the 𝑡 statistic under 𝐻0 known as Dickey-Fuller distribution
for test the 𝜃 in (8.1.5).

RIZAUDIN SAHLAN 5
8.1 TESTING FOR UNIT ROOTS
• Means that we can use the value of 𝑡 statistics (or 𝜏𝑠 )from
regression in (8.1.5), but we will used the table (distribution)
tabulated by Dickey and Fuller to get the critical value 𝜏𝑐 .
• The resulting test for (8.1.5) is known as Dickey-Fuller (DF)
test for a unit root.

• We reject the null hypothesis 𝐻0 : 𝜃 = 0, against 𝐻1 : 𝜃 < 0 if


𝜏𝑠 < 𝜏𝑐 , where 𝜏𝑐 is one of the negative value in Table D.7.
RIZAUDIN SAHLAN 6
8.1 TESTING FOR UNIT ROOTS
• If the test of (8.1.5) show that the 𝐻0 is rejected, that means
the series of 𝑦𝑡 is stationary or no unit root at the level form
and we donate it as 𝑦𝑡 ~𝐼 0 .
• But, if the 𝐻0 is fail to rejected, that means the series is non-
stationary and to make the series is stationary, we must to
differenced the data.
• The first difference for (8.1.5) will become;
∆2 𝑦𝑡 = 𝛼 + 𝜃∆𝑦𝑡−1 + 𝑒𝑡
where ∆2 𝑦𝑡 = ∆𝑦𝑡 − ∆𝑦𝑡−1

• If the above equation the 𝐻0 is rejected, that means the 𝑦𝑡


series in first difference is stationary, or integrated at 𝐼(1) and
we donate it as 𝑦𝑡 ~𝐼 1 .
RIZAUDIN SAHLAN 7
8.1 TESTING FOR UNIT ROOTS
• That means, if the series is non-stationary, we must make is
stationary by difference the data until the series become
stationary.
• If the series need to be stationary by difference d times until
its stationary, it means that the series is 𝑦𝑡 ~𝐼 𝑑 .

RIZAUDIN SAHLAN 8
8.1 TESTING FOR UNIT ROOTS

Example : Unit root test for three-month T-Bill rates


• We use the quarterly data in INTQRT.dta to test for a unit root
in three-month T-bills rates;

∆𝑟3𝑡 = 𝛼 + 𝜃𝑟3𝑡−1 + 𝑢𝑡

where 𝑟3𝑡 = three month T-bill rates

RIZAUDIN SAHLAN 9
8.1 TESTING FOR UNIT ROOTS

Source SS df MS Number of obs = 123


F(1, 121) = 6.12
Model 9.22556542 1 9.22556542 Prob > F = 0.0148
Residual 182.506035 121 1.50831434 R-squared = 0.0481
Adj R-squared = 0.0403
Total 191.7316 122 1.5715705 Root MSE = 1.2281

D.r3 Coef. Std. Err. t P>|t| [95% Conf. Interval]

r3
L1. -.0907106 .0366782 -2.47 0.015 -.1633247 -.0180965

_cons .6253371 .2608254 2.40 0.018 .1089645 1.14171

RIZAUDIN SAHLAN 10
8.1 TESTING FOR UNIT ROOTS
• The value of 𝜃 = −0.09 and the value of 𝜏𝑠 = −2.47.
• If we choose the significance level 0.05 with 𝑛 = 100, the
critical value from Table D.7 is 𝜏𝑐 = −2.89
• Because the 𝜏𝑠 > 𝜏𝑐 , therefore, we fail to reject 𝐻0 : 𝜃 = 0
againts 𝐻𝑎 : 𝜃 < 0 .
• That means, the time series of three-month T-bills have a unit
root, or non-stationary in level form
• When we fail to reject a unit root, we should only conclude
that the data do not provide strong evidence againts 𝐻0 .

RIZAUDIN SAHLAN 11
8.1 TESTING FOR UNIT ROOTS
• Because the series is non-stationary in level form, we must
difference the data to make the series become stationary.
• To make the first difference for series;
∆2 𝑟3𝑡 = 𝛼 + 𝜃∆𝑟3𝑡−1 + 𝑢𝑡
where ∆2 𝑟3𝑡 = ∆𝑟3𝑡 − ∆𝑟3𝑡−1

Source SS df MS Number of obs = 122


F(1, 120) = 151.33
Model 238.521294 1 238.521294 Prob > F = 0.0000
Residual 189.140092 120 1.57616744 R-squared = 0.5577
Adj R-squared = 0.5540
Total 427.661387 121 3.53439162 Root MSE = 1.2555

D2.r3 Coef. Std. Err. t P>|t| [95% Conf. Interval]

r3
LD. -1.115726 .0906975 -12.30 0.000 -1.295301 -.9361516

_cons .0451128 .1137342 0.40 0.692 -.1800729 .2702986

RIZAUDIN SAHLAN 12
8.1 TESTING FOR UNIT ROOTS
• The value of 𝜃 = −1.11 and the value of 𝜏𝑠 = −12.30.
• If we choose the significance level 0.05 with 𝑛 = 100, the
critical value from Table D.7 is 𝜏𝑐 = −2.89
• Because the 𝜏𝑠 < 𝜏𝑐 , therefore, we reject 𝐻0 : 𝜃 = 0 againts
𝐻𝑎 : 𝜃 < 0 .
• That means, the time series of three-month T-bills in first
difference not have a unit root, or stationary and we can say
that the series of 𝑟3 is integrated at 𝐼 1 , or 𝑟3~𝐼(1).

RIZAUDIN SAHLAN 13
8.1 TESTING FOR UNIT ROOTS
• We also need to test for unit roots in models with more
complicated dynamics.
• If 𝑦𝑡 follows (8.1.1) with 𝜌 = 1, then ∆𝑦𝑡 will make 𝑦 serially
uncorrelated.
• We can allow ∆𝑦𝑡 to follow an AR model by augmenting
(8.1.5) with additional lags;

∆𝑦𝑡 = 𝛼 + 𝜃𝑦𝑡−1 + 𝛾1 ∆𝑦𝑡−1 + 𝑒𝑡 (8.1.6)

where 𝛾1 < 1.
• This ensure that, under 𝐻0 : 𝜃 = 0, ∆𝑦𝑡 follows a stable
AR(1) model.

RIZAUDIN SAHLAN 14
8.1 TESTING FOR UNIT ROOTS
• Generally, we can add 𝑝 lags on ∆𝑦𝑡 to the equation to
account for the dynamic in the process;

𝑝
∆𝑦𝑡 = 𝛼 + 𝜃𝑦𝑡−1 + 𝛾𝑖 𝑖=1 ∆𝑦𝑡−𝑖 + 𝑒𝑡 (8.1.7)

where 𝛾𝑖 < 1 and then carry out the 𝜏-test on 𝜃 , the


coefficient 𝑦𝑡 just as before.
• This extended version of DF test is called the augmented
Dickey-Fuller (ADF) test because we augmented with lagged
changes, ∆𝑦𝑡−𝑖 .

RIZAUDIN SAHLAN 15
8.1 TESTING FOR UNIT ROOTS
• The critical value and rejection rule are the same as before.
• The inclusion of the lagged changes in (8.1.7) is intended to
clean up any serial correlated in ∆𝑦𝑡 .
• The more lags we include, the more initial obs we lose.

Example : Unit root test for annual U.S inflation


• We use data on U.S inflation , based on CPI, to test a unit root
in inflation in data PHILLIPS.dta, with period 1948 -1996.
• Allowing for one lag on ∆𝑖𝑛𝑓𝑡 , the model become;

∆𝑖𝑛𝑓𝑡 = 𝛼 + 𝜃𝑖𝑛𝑓𝑡−1 + 𝛾∆𝑖𝑛𝑓𝑡−1 + 𝑢𝑡

RIZAUDIN SAHLAN 16
8.1 TESTING FOR UNIT ROOTS

Source SS df MS Number of obs = 47


F(2, 44) = 4.57
Model 38.4043273 2 19.2021636 Prob > F = 0.0158
Residual 184.96036 44 4.20364454 R-squared = 0.1719
Adj R-squared = 0.1343
Total 223.364687 46 4.85575407 Root MSE = 2.0503

D.inf Coef. Std. Err. t P>|t| [95% Conf. Interval]

inf
L1. -.3103252 .1027077 -3.02 0.004 -.517319 -.1033315
LD. .1383615 .1264026 1.09 0.280 -.1163861 .3931091

_cons 1.360791 .5167103 2.63 0.012 .3194297 2.402152

RIZAUDIN SAHLAN 17
8.1 TESTING FOR UNIT ROOTS
• The value of 𝜃 = −0.310 and the value of 𝜏𝑠 = −3.02.
• If we choose the significance level 0.05 with 𝑛 = 50, the
critical value from Table D.7 is 𝜏𝑐 = −2.93
• Because the 𝜏𝑠 < 𝜏𝑐 , therefore, we successfully reject
𝐻0 : 𝜃 = 0 againts 𝐻𝑎 : 𝜃 < 0 .
• That means, the time series of inflation in level form not have
a unit root, or stationary, 𝑖𝑛𝑓~𝐼(0).
• Alternatively, we also can use the command provided by Stata
to perform the ADF test, dfuller.

RIZAUDIN SAHLAN 18
8.1 TESTING FOR UNIT ROOTS

Augmented Dickey-Fuller test for unit root Number of obs = 47

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -3.021 -3.600 -2.938 -2.604

MacKinnon approximate p-value for Z(t) = 0.0329

RIZAUDIN SAHLAN 19
8.1 TESTING FOR UNIT ROOTS
• For series that have clear time trends, we need to modify the
test for unit root.
• If we carry out the usual DF or ADF test on a trending but I(0)
series, we probably have little power for rejecting a unit root.
• To allow for series with time trends, we can change the basic
equation to

∆𝑦𝑡 = 𝛼 + 𝛿𝑡 + 𝜃𝑦𝑡−1 + 𝑒𝑡 (8.1.8)

where again the null hypothesis is 𝐻0 : 𝜃 = 0 against


𝐻1 : 𝜃 < 0 .
• Under the alternative, 𝑦𝑡 is a trend stationary process.

RIZAUDIN SAHLAN 20
8.1 TESTING FOR UNIT ROOTS
• If 𝑦𝑡 has a unit root, then ∆𝑦𝑡 = 𝛼 + 𝛿𝑡 + 𝑒𝑡 , as so the change
in 𝑦𝑡 has a mean linear in 𝑡 unless 𝛿 = 0.
• When we include a time trend in the regression, the critical
values 𝜏𝑐 of the test change.
• Intuitively, this occurs because detrending a unit root process
tends to make it look more like an I(0) process.
• Therefore, we require a larger magnitude for the 𝜏-statistics in
order to reject 𝐻0 .
• The DF critical value for the 𝜏-test that includes a time time
trend are also given in Table D.7.

RIZAUDIN SAHLAN 21
8.1 TESTING FOR UNIT ROOTS
Example : Unit root in the log of U.S Real Gross Domestic Product
• We apply the unit root test with time trend to the U.S. GDP
data in INVEN.dta.
• This annual data cover the years from 1959 through 1995.
• We test whether log 𝐺𝐷𝑃𝑡 has a unit root (ADF test);

∆ log 𝐺𝐷𝑃𝑡 = 𝛼 + 𝛿𝑡 + 𝜃 log 𝐺𝐷𝑃𝑡 + 𝛾∆ log 𝐺𝐷𝑃𝑡−1 + 𝑒𝑡

RIZAUDIN SAHLAN 22
8.1 TESTING FOR UNIT ROOTS

7000
6000
GDP, billions '92 $

5000
4000
3000
2000

1960 1970 1980 1990 2000


1959-1995

RIZAUDIN SAHLAN 23
8.1 TESTING FOR UNIT ROOTS
. tsset year
time variable: year, 1959 to 1995
delta: 1 unit

. gen lgdp=log(gdp)

. reg D.lgdp year L.lgdp DL.lgdp

Source SS df MS Number of obs = 35


F(3, 31) = 3.78
Model .004591884 3 .001530628 Prob > F = 0.0201
Residual .012541804 31 .000404574 R-squared = 0.2680
Adj R-squared = 0.1972
Total .017133688 34 .000503932 Root MSE = .02011

D.lgdp Coef. Std. Err. t P>|t| [95% Conf. Interval]

year .0058696 .002696 2.18 0.037 .0003711 .0113681

lgdp
L1. -.2096203 .0865941 -2.42 0.022 -.3862301 -.0330104
LD. .2637479 .1647397 1.60 0.120 -.0722409 .5997367

_cons -9.841804 4.620125 -2.13 0.041 -19.26461 -.4189969

RIZAUDIN SAHLAN 24
8.1 TESTING FOR UNIT ROOTS
• The value of 𝜃 = −0.210 and the value of 𝜏𝑠 = −2.42.
• If we choose the significance level 0.05 with 𝑛 = 50, the
critical value from Table D.7 (with trend) is 𝜏𝑐 = −3.50
• Because the 𝜏𝑠 > 𝜏𝑐 , therefore, we fail to reject 𝐻0 : 𝜃 = 0
againts 𝐻𝑎 : 𝜃 < 0 .
• That means, the time series of log GDP in level form have a
unit root, or non-stationary.
• Because the series of 𝑙𝑔𝑑𝑝 is non-stationary at level form, the
series must be difference until its stationary.

RIZAUDIN SAHLAN 25
8.1 TESTING FOR UNIT ROOTS
• The ADF test for 𝑙𝑔𝑑𝑝 in first difference;

Source SS df MS Number of obs = 34


F(3, 30) = 9.76
Model .012762903 3 .004254301 Prob > F = 0.0001
Residual .013076144 30 .000435871 R-squared = 0.4939
Adj R-squared = 0.4433
Total .025839046 33 .000783001 Root MSE = .02088

D2.lgdp Coef. Std. Err. t P>|t| [95% Conf. Interval]

year -.0008905 .0003952 -2.25 0.032 -.0016977 -.0000834

lgdp
LD. -1.111196 .2192083 -5.07 0.000 -1.558879 -.6635132
LD2. .3070998 .1697173 1.81 0.080 -.0395092 .6537087

_cons 1.796813 .7846254 2.29 0.029 .1943937 3.399232

RIZAUDIN SAHLAN 26
8.1 TESTING FOR UNIT ROOTS
• The value of 𝜃 = −0.111 and the value of 𝜏𝑠 = −5.07.
• If we choose the significance level 0.05 with 𝑛 = 50, the
critical value from Table D.7 (with trend) is 𝜏𝑐 = −3.50
• Because the 𝜏𝑠 < 𝜏𝑐 , therefore, we reject 𝐻0 : 𝜌 = 1 againts
𝐻𝑎 : 𝜌 < 1 , or 𝐻0 : 𝜃 = 0 againts 𝐻𝑎 : 𝜃 < 0 .
• That means, the time series of log GDP in first difference not
have a unit root, or stationary, 𝑙𝑔𝑑𝑝~𝐼 1 .
• Alternatively, we also can use the command provided by Stata
to perform the ADF test, dfuller.

RIZAUDIN SAHLAN 27
8.1 TESTING FOR UNIT ROOTS
Level Form:

Augmented Dickey-Fuller test for unit root Number of obs = 35

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -2.421 -4.288 -3.560 -3.216

MacKinnon approximate p-value for Z(t) = 0.3687

First Difference:

Augmented Dickey-Fuller test for unit root Number of obs = 34

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -5.069 -4.297 -3.564 -3.218

MacKinnon approximate p-value for Z(t) = 0.0002

RIZAUDIN SAHLAN 28
8.2 SPURIOUS REGRESSION
• In cross-sectional context, we use phrase “spurious
correlation” to describe where two variable are related
through their correlation with third variable.
• If we regress 𝑦 on 𝑥, we find a significant relationship.
• But, when we control for another variable, say 𝑧, the partial
effect of 𝑥 on 𝑦 become zero.
• Naturally, this can also happen in TS context with non-
stationary variables.
• It is possible to find a spurious relationship between TS that
have increasing or decreasing trend.
• If the series are weakly dependent about their time trends,
the problem is effectively solved by including a time trend in
the regression model.
RIZAUDIN SAHLAN 29
8.2 SPURIOUS REGRESSION
• Let 𝑥𝑡 and 𝑦𝑡 be random walks generated by
𝑥𝑡 = 𝑥𝑡−1 + 𝑢𝑡 (8.2.1)
and
𝑦𝑡 = 𝑦𝑡−1 + 𝑒𝑡 (8.2.2)

where 𝑎𝑡 ~𝑖𝑖𝑑 0, 𝜎 2 and 𝑒𝑡 ~𝑖𝑖𝑑 0, 𝜎 2 . Assume that the


initial value to be 𝑥0 = 𝑦0 = 0 and 𝑎𝑡 and 𝑒𝑡 are
independent processes.
• But what if we run this simple regression

𝑦𝑡 = 𝛽0 + 𝛽1 𝑥𝑡 (8.2.3)

RIZAUDIN SAHLAN 30
8.2 SPURIOUS REGRESSION
and obtained the usual 𝑡 statistics for 𝛽1 and the usual 𝑅-
squared?
• Because 𝑦𝑡 and 𝑥𝑡 are independent, we would hope that
𝑝𝑙𝑖𝑚 𝛽1 = 0.
• Or, if we test 𝐻0 : 𝛽0 = 0 against 𝐻1 : 𝛽0 ≠ 0 , we hope that the
𝑡-statistic for 𝛽1 is insignificant .
• But, the study by Granger and Newbold (1974) through
simulation showed that this is not the case: even the 𝑦𝑡 and
𝑥𝑡 are independent.
• The regression of 𝑦𝑡 on 𝑥𝑡 yields a statistical significant 𝑡-
statistics.
• Granger and Newbold called this is the spurious regression
problem : there is no sense in which 𝑦 and 𝑥 are related, but
an OLS regression using 𝑡-statistics
RIZAUDIN SAHLAN
indicate relationship. 31
8.2 SPURIOUS REGRESSION
• Including a time trend does not really change the conclusion .
• If 𝑦𝑡 or 𝑥𝑡 is a random walk with drift and the time trend not
included, the spurious regression problem is even worse.
• The possibility of spurious regression with I(1) variable is quite
important and has led economist to reexamine many
aggregate TS regression whose 𝑡 statistics were very
significant and whose 𝑅-squared were extremely high.
• In the next section, we show that regressing an I(1)
dependent variable on an I(1) independent variable can be
informative, but only if these variables are related in a precise
sense.

RIZAUDIN SAHLAN 32
8.2 SPURIOUS REGRESSION
• Now, lets we looks the meaning of spurious regression with
the data generating process (DGP) for equation (8.2.1) and
(8.2.2).
• We generate 500 obs of 𝑒𝑥𝑡 from 𝑒𝑥𝑡 ~𝑁 0,1 and 500 obs of
𝑒𝑦𝑡 from 𝑒𝑦𝑡 ~𝑁 0,1 and assume that the initial value of both
𝑥 and 𝑦 are zero.

RIZAUDIN SAHLAN 33
8.2 SPURIOUS REGRESSION
. * generate the obs
. set obs 500
number of observations (_N) was 0, now 500

. gen t=_n

. tsset t
time variable: t, 1 to 500
delta: 1 unit

. * generate the residual


. gen ex=rnormal(0,1)

. gen ey=rnormal(0,1)

. * generate series x
. gen x=0

. replace x=0.1+x[_n-1]+ex in 2/500


(499 real changes made)

. * generate series y
. gen y=0

. replace y=0.1+y[_n-1]+ey in 2/500


(499 real changes made)

RIZAUDIN SAHLAN 34
8.2 SPURIOUS REGRESSION
. tsline y x, title("Random Walk Model")

Random Walk Model


40
30
20
10
0
-10

0 100 200 300 400 500


t

y x

RIZAUDIN SAHLAN 35
8.2 SPURIOUS REGRESSION
• Lets we perform the unit root test these series;
ADF test on 𝑥 in level form
Augmented Dickey-Fuller test for unit root Number of obs = 498

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -0.143 -3.440 -2.870 -2.570

MacKinnon approximate p-value for Z(t) = 0.9449

ADF test on 𝑦 in level form


Augmented Dickey-Fuller test for unit root Number of obs = 498

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -2.133 -3.440 -2.870 -2.570

MacKinnon approximate p-value for Z(t) = 0.2316

• Both the series is non-stationary in level form.


RIZAUDIN SAHLAN 36
8.2 SPURIOUS REGRESSION
• Now, lets we perform the unit root test these series in first
difference;
ADF test on 𝑥 in first difference form
Augmented Dickey-Fuller test for unit root Number of obs = 497

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -15.516 -3.440 -2.870 -2.570

MacKinnon approximate p-value for Z(t) = 0.0000

ADF test on 𝑦 in first difference form


Augmented Dickey-Fuller test for unit root Number of obs = 497

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -15.029 -3.440 -2.870 -2.570

MacKinnon approximate p-value for Z(t) = 0.0000

RIZAUDIN SAHLAN 37
8.2 SPURIOUS REGRESSION
• Both the series is now stationary at first difference, or 𝑥𝑡 ~(1)
and 𝑦𝑡 ~(1) .
• Now, we regress 𝑦𝑡 on 𝑥𝑡 in level form by OLS ;
𝑦𝑡 = 𝛽0 + 𝛽1 𝑥𝑡 + 𝑢𝑡
. reg y x

Source SS df MS Number of obs = 500


F(1, 498) = 366.56
Model 40216.0003 1 40216.0003 Prob > F = 0.0000
Residual 54636.2666 498 109.711379 R-squared = 0.4240
Adj R-squared = 0.4228
Total 94852.2669 499 190.084703 Root MSE = 10.474

y Coef. Std. Err. t P>|t| [95% Conf. Interval]

x 1.297351 .0677616 19.15 0.000 1.164217 1.430485


_cons 14.87082 .5786981 25.70 0.000 13.73383 16.00781

. estat dwatson

Durbin-Watson d-statistic( 2, 500) = .0220122

RIZAUDIN SAHLAN 38
8.2 SPURIOUS REGRESSION
• The results show that the coefficients of 𝑥𝑡 is highly
statistically significance and although the 𝑅2 value is low, its
statistically significantly different from zero.
• From this results, we may tempted to concluded that there is
a significant statistical relationship between 𝑥 and 𝑦, whereas
a priori there should be none.
• This is nutshell the phenomenon of spurious or nonsense
regression first discovered by Yule (1926).
• Yule show that spurious correlation could persist in
nonstationary time series even the sample is large.
• According to Granger and Newbold (1974), an 𝑅2 > 𝑑 is a
good rule of thumb to suspect that the estimated regression is
spurious.
RIZAUDIN SAHLAN 39
8.3 COINTEGRATION
• The discussion of spurious regression in the previous section
certainly makes one wary of using the levels of variables
which is non-stationary in regression analysis.
• We suggested that non-stationary variable should be
differenced and stationary before they can used in linear
regression models.

RIZAUDIN SAHLAN 40
8.3 COINTEGRATION

• The notion cointegration, which was given a formal treatment


in Engle and Granger (1987), makes regression involving I(1)
variables potentially meaningful.
• A full treatment of cointegration is mathematically involved,
but we can describe the basic issues and method that are
used in many applications.

RIZAUDIN SAHLAN 41
8.3 COINTEGRATION
• If 𝑦𝑡 : 𝑡 = 0,1, … and 𝑥𝑡 : 𝑡 = 0,1, … are two I(1) processes,
then, in general 𝑦𝑡 − 𝛽𝑥𝑡 is an I(1) process for any number of
𝛽.
• It also possible that for some 𝛽 ≠ 0, the 𝑦𝑡 − 𝛽𝑥𝑡 is an I(0)
process which means it has constant mean, constant variance
and autocorrelation that depends only on time distance
between any two variables in the series, and its
asymptotically uncorrelated.
• If such a 𝛽 exists, we say that 𝑦 and 𝑥 cointegrated, and 𝛽 is
cointegration parameter.

RIZAUDIN SAHLAN 42
8.3 COINTEGRATION
• For illustration, assume 𝛽 = 1 and 𝑦0 = 𝑥0 = 0.
• We write
𝑦𝑡 = 𝑦𝑡−1 + 𝑟𝑡 , (8.3.1)
𝑥𝑡 = 𝑥𝑡−1 + 𝑣𝑡 , (8.3.2)
where 𝑟𝑡 and 𝑣𝑡 are two I(0) processes with zero means.

• Then, because 𝑦𝑡 and 𝑥𝑡 is an I(1) process, the series have a


tendency to wander around and not return to the initial value
of zero with any regularity.
• By contrast, if 𝑦𝑡 − 𝛽𝑥𝑡 is I(0), it has a zero mean and return
to zero with some regularity.

RIZAUDIN SAHLAN 43
8.3 COINTEGRATION

Example : Unit root test for three-month T-Bill rates

• For example, let use the data in INTQRT.dta.


• Let 𝑟6 be the interest rate for six-month T-bills and lets 𝑟3 be
the interest rate for three-month T-bills.
• Lets we perform the ADF test for these two interest rate.

RIZAUDIN SAHLAN 44
8.3 COINTEGRATION
ADF test in level form for 𝑟3
Augmented Dickey-Fuller test for unit root Number of obs = 122

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -2.250 -3.503 -2.889 -2.579

MacKinnon approximate p-value for Z(t) = 0.1887

ADF test in level form for 𝑟6


Augmented Dickey-Fuller test for unit root Number of obs = 122

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -2.136 -3.503 -2.889 -2.579

MacKinnon approximate p-value for Z(t) = 0.2302

RIZAUDIN SAHLAN 45
8.3 COINTEGRATION
• We found a evidence that both 𝑟3 and 𝑟6 has a unit root or
non-stationary in level form.
• Now, lets we perform the unit root again but with in first
difference.

RIZAUDIN SAHLAN 46
8.3 COINTEGRATION
ADF test in first difference form for 𝑟3
Augmented Dickey-Fuller test for unit root Number of obs = 121

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -10.294 -3.503 -2.889 -2.579

MacKinnon approximate p-value for Z(t) = 0.0000

ADF in first difference form for 𝑟6


Augmented Dickey-Fuller test for unit root Number of obs = 121

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -10.353 -3.503 -2.889 -2.579

MacKinnon approximate p-value for Z(t) = 0.0000

RIZAUDIN SAHLAN 47
8.3 COINTEGRATION
• Now, we found a evidence that both 𝑟3 and 𝑟6 has a unit
root in level form but stationary at first difference, 𝑟3~𝐼(1)
and 𝑟6~𝐼(1) .
• Lets we define the gap between six- and three-month T-bill
rates as;
𝑠𝑝𝑟𝑡 = 𝑟6𝑡 − 𝑟3𝑡

• Then, using the Eq(8.1.5) in unit root test;

∆𝑠𝑝𝑟𝑡 = 𝛼 + 𝜃𝑠𝑝𝑟𝑡−1 + 𝑒𝑡

RIZAUDIN SAHLAN 48
8.3 COINTEGRATION
ADF test in level form for 𝑠𝑝𝑟
. gen spr=r6-r3

Dickey-Fuller test for unit root Number of obs = 123

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -7.710 -3.502 -2.888 -2.578

MacKinnon approximate p-value for Z(t) = 0.0000

RIZAUDIN SAHLAN 49
8.3 COINTEGRATION

20
15
10
5
0

0 50 100 150
time

bond equiv. yield, 3 mo T-bill bond equiv. yield, 6 mo T-bill


spr

RIZAUDIN SAHLAN 50
8.3 COINTEGRATION
• The results show that the time series of 𝑠𝑝𝑟 in level form not
have a unit root, or stationary, I(0).
• The upshot of this is that though 𝑟6𝑡 and 𝑟3𝑡 each appear to
be unit root processes in level form, the difference between
them is an I(0) process.
• In other words, 𝑟6 and 𝑟3 are cointegrated.

RIZAUDIN SAHLAN 51
8.3 COINTEGRATION
• Cointegration in this example, as in many example, has
economic interpretation.
• If 𝑟6 and 𝑟3 were not cointegrated, the gap between interest
rate could become very large, with no tendency for them to
come back together.
• From simple arbitrage argument, this seem unlikely.
• Supposed that the spread 𝑠𝑝𝑟𝑡 continues to grow for several
time period – making six-month T-bill much more desirable
investment.
• Then, investor will shift away from three-month T-bill and
toward six-month T-bills.
• Because interest rates are inversely related to price, this
would lower 𝑟6 and increase 𝑟3, until the spread is reduced.
RIZAUDIN SAHLAN 52
8.3 COINTEGRATION
• Therefore, large deviation between 𝑟6 and 𝑟3 are not
expected to continue: the spread has a tendency to return to
its mean value.

• In the interest rate example, we used economic reasoning to


tell us the value of 𝛽 if 𝑦𝑡 and 𝑥𝑡 are cointegrated.
• If we have hypothesized value of 𝛽, then testing whether two
series are cointegrated is easy: we simply define a new
variables,
𝑠𝑡 = 𝑦𝑡 − 𝑥𝑡

and apply either the DF or ADF test to 𝑠𝑡 .

RIZAUDIN SAHLAN 53
8.3 COINTEGRATION
• If we reject a unit root in 𝑠𝑡 , then find that 𝑦𝑡 and 𝑥𝑡 are
cointegrated.
• In other words, the null hypothesis is that 𝑦𝑡 and 𝑥𝑡 are not
cointegrated.

• Testing for cointegration is more difficult when the (potential)


cointegration parameter 𝛽 is unknown.
• Rather than test for a unit root in 𝑠𝑡 , we must first estimate
𝛽.
• If 𝑦𝑡 and 𝑥𝑡 are cointegrated, it turns out that the OLS
estimator 𝛽 from the regression
𝑦𝑡 = 𝛼 + 𝛽𝑥𝑡 (8.3.4)

is consistent for 𝛽.
RIZAUDIN SAHLAN 54
8.3 COINTEGRATION
• The problem is that the null hypothesis state that two series
are not cointegrated, which means under 𝐻0 we running a
spurious regression.
• It’s possible to tabulate critical values even when 𝛽 is
estimated, we apply the DF or ADF test on residual from
Eq(8.3.4);

𝑢𝑡 = 𝑦𝑡 − 𝛽𝑥𝑡 (8.3.5)

• Perform the DF or ADF test and then get the resulting test is
called the Engle-Granger(EG) test an the asymptotic critical
values are given in Table 18.4.
• These are taken from Davidson and MacKinnon (1993,Table
20.2).

RIZAUDIN SAHLAN 55
8.3 COINTEGRATION

RIZAUDIN SAHLAN 56
8.3 COINTEGRATION
• In the basic test, we run;

∆𝑢𝑡 = 𝜃𝑢𝑡−1 + 𝜀𝑡 (8.3.6)

and compare the 𝑡-statistics on 𝜃 to the desired critical value


in Table C.

• If the 𝑡-statistics is below the critical value, we have evidence


that 𝑦𝑡 − 𝛽𝑥𝑡 is I(0) for some 𝛽: that is, 𝑦𝑡 and 𝑥𝑡 are
cointegrated.

RIZAUDIN SAHLAN 57
8.3 COINTEGRATION
• If 𝑦𝑡 and 𝑥𝑡 are not cointegrated, a regression of 𝑦𝑡 on 𝑥𝑡 is
spurious and tells us nothing meaningful: there is no long-run
relationship between 𝑥𝑡 and 𝑦𝑡 .
• For this case, we can still run a regression involving the first
differences, ∆𝑦𝑡 and ∆𝑥𝑡 , including lags.
• But we should interpret these regressions for what they are:
they explain the difference in 𝑦 in terms of the difference in 𝑥
and have nothing necessarily to do with relationship in levels.

RIZAUDIN SAHLAN 58
8.3 COINTEGRATION

Example : Cointegration between fertility and personal


exemption

• We use the data in FERTIL3.dta to estimate the relationship


between the general fertility rate 𝑔𝑓𝑟 and the real value of
the personal tax exemption 𝑝𝑒 in the United States;
𝑔𝑓𝑟𝑡 = 𝛽0 + 𝛽1 𝑝𝑒𝑡 + 𝛽2 𝑡 + 𝑢𝑡 (8.3.7)

RIZAUDIN SAHLAN 59
8.3 COINTEGRATION

Source SS df MS Number of obs = 72


F(2, 69) = 34.53
Model 13929.0853 2 6964.54264 Prob > F = 0.0000
Residual 13918.8101 69 201.721886 R-squared = 0.5002
Adj R-squared = 0.4857
Total 27847.8954 71 392.223879 Root MSE = 14.203

gfr Coef. Std. Err. t P>|t| [95% Conf. Interval]

pe .186662 .0346265 5.39 0.000 .1175841 .2557399


year -.9051881 .1089923 -8.31 0.000 -1.122622 -.6877543
_cons 1840.65 210.0516 8.76 0.000 1421.608 2259.691

RIZAUDIN SAHLAN 60
8.3 COINTEGRATION

250
200
150
100
50
0

1920 1940 1960 1980


1913 to 1984

births per 1000 women 15-44 real value pers. exemption, $

RIZAUDIN SAHLAN 61
8.3 COINTEGRATION
• Lets perform the ADF test in level form for 𝑔𝑓𝑟 and 𝑝𝑒 with 1
lags;
ADF test in level for 𝑔𝑓𝑟
Augmented Dickey-Fuller test for unit root Number of obs = 70

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -1.330 -3.552 -2.914 -2.592

MacKinnon approximate p-value for Z(t) = 0.6155

ADF test in level for 𝑝𝑒


Augmented Dickey-Fuller test for unit root Number of obs = 70

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -1.871 -3.552 -2.914 -2.592

MacKinnon approximate p-value for Z(t) = 0.3456

RIZAUDIN SAHLAN 62
8.3 COINTEGRATION
• The results show that for both variables, the 𝜏𝑠 > 𝜏𝑐 at 5%
significance level, which means the null hypothesis for unit
root is fail to rejected.
• This means that the 𝑔𝑓𝑟 and 𝑝𝑒 have a unit root or non-
stationary in level form.

RIZAUDIN SAHLAN 63
8.3 COINTEGRATION
• Now, lets perform the ADF test for 𝑔𝑓𝑟 and 𝑝𝑒 in first
difference with 1 lags;
ADF test in first difference for 𝑔𝑓𝑟
Augmented Dickey-Fuller test for unit root Number of obs = 69

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -5.907 -3.553 -2.915 -2.592

MacKinnon approximate p-value for Z(t) = 0.0000

ADF test in first difference for 𝑝𝑒


Augmented Dickey-Fuller test for unit root Number of obs = 69

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -5.461 -3.553 -2.915 -2.592

MacKinnon approximate p-value for Z(t) = 0.0000

RIZAUDIN SAHLAN 64
8.3 COINTEGRATION

• The results show that for both variables, the 𝜏𝑠 < 𝜏𝑐 at 5%


significance level which means null hypothesis for unit root is
rejected.
• This means that the 𝑔𝑓𝑟 and 𝑝𝑒 in first-difference is
stationary.

RIZAUDIN SAHLAN 65
8.3 COINTEGRATION

• Then, lets we obtain the estimated residual


𝑢𝑡 = 𝑔𝑓𝑟𝑡 − 𝛽1 𝑝𝑒𝑡 − 𝛽2 𝑡 (8.3.8)

• and perform the DF test to estimated residual;

∆𝑢𝑡 = 𝜃𝑢𝑡−1 + 𝜀𝑡 (8.3.9)

RIZAUDIN SAHLAN 66
8.3 COINTEGRATION
. tsline uhat
20
0
Residuals

-20
-40

1920 1940 1960 1980


1913 to 1984

RIZAUDIN SAHLAN 67
8.3 COINTEGRATION

Source SS df MS Number of obs = 71


F(1, 69) = 3.75
Model 123.299965 1 123.299965 Prob > F = 0.0570
Residual 2270.40474 69 32.9044165 R-squared = 0.0515
Adj R-squared = 0.0378
Total 2393.70471 70 34.1957815 Root MSE = 5.7362

D.uhat Coef. Std. Err. t P>|t| [95% Conf. Interval]

uhat
L1. -.0942049 .0486653 -1.94 0.057 -.1912895 .0028797

_cons -.1572106 .6807747 -0.23 0.818 -1.515319 1.200898

RIZAUDIN SAHLAN 68
8.3 COINTEGRATION
• The value of 𝜃 = −0.0942 and the value of 𝑡𝑠 = −1.94.
• If we choose the significance level 5%, the critical value from
Table C with 𝑇= 2 and three variables is 𝑡𝑐 = −3.915.
• Because the 𝑡𝑠 > 𝑡𝑐 , therefore we must concluded that there
is no evidence of cointegration between 𝑔𝑓𝑟 and 𝑝𝑒.
• It is very likely that the earlier regression results we obtained
in level form as in (8.3.7) is suffer from the spurious
regression problem.
• Alternatively, we also can use the command provided by Stata
to perform the EG test, egranger.

RIZAUDIN SAHLAN 69
8.3 COINTEGRATION

Engle-Granger test for cointegration N (1st step) = 72


N (test) = 71

Test 1% Critical 5% Critical 10% Critical


Statistic Value Value Value

Z(t) -1.948 -4.504 -3.863 -3.540

Critical values from MacKinnon (1990, 2010)

RIZAUDIN SAHLAN 70
8.4 ERROR CORRECTION MODEL
• In addition to learning about a potential long-run relationship
between two series, the concept of cointegration enriches the
kinds of dynamic models.
• If 𝑦𝑡 and 𝑥𝑡 are I(1) processes and are cointegrated, we might
estimate a dynamic model in first differences.
• Consider the equation;

∆𝑦𝑡 = 𝛼0 + 𝛼1 ∆𝑦𝑡−1 + 𝛾0 ∆𝑥𝑡 + 𝛾1 ∆𝑥𝑡−1 + 𝑢𝑡


(8.4.1)

where 𝑢𝑡 has zero mean given ∆𝑥𝑡 , ∆𝑦𝑡−1 , ∆𝑥𝑡−1 and further
lags.

RIZAUDIN SAHLAN 71
8.4 ERROR CORRECTION MODEL
• If 𝑦𝑡 and 𝑥𝑡 are cointegrated with parameter 𝛽, then we have
additional I(0) variables that we can include in (8.4.1).
• Let
𝐸𝐶𝑡 = 𝑦𝑡 − 𝛽𝑥𝑡

so that 𝑠𝑡 is I(0), and assume that 𝑠𝑡 has zero mean.

• Now, we can include one lags of 𝐸𝐶𝑡 in the equation.

∆𝑦𝑡 = 𝛼0 + 𝛼1 ∆𝑦𝑡−1 + 𝛾0 ∆𝑥𝑡 + 𝛾1 ∆𝑥𝑡−1 + 𝛿𝐸𝐶𝑡−1 + 𝑢𝑡


= 𝛼0 + 𝛼1 ∆𝑦𝑡−1 + 𝛾0 ∆𝑥𝑡 + 𝛾1 ∆𝑥𝑡−1 + 𝛿 𝑦𝑡−1 − 𝛽𝑥𝑡−1 + 𝑢𝑡
(8.4.2)

RIZAUDIN SAHLAN 72
8.4 ERROR CORRECTION MODEL
• The term 𝛿 𝑦𝑡−1 − 𝛽𝑥𝑡−1 is called the error correction term
and Eq(8.4.2) is an example of an error correction model
(ECM).
• The ECM allows us to study the short-run dynamics in the
relationship between 𝑦 and 𝑥.
• For simplicity, consider the model without lags of ∆𝑦𝑡 and ∆𝑥𝑡 ;

∆𝑦𝑡 = 𝛼0 + ∆𝑥𝑡 + 𝛿 𝑦𝑡−1 − 𝛽𝑥𝑡−1 + 𝑢𝑡 (8.4.3)

where 𝛿 < 0.

RIZAUDIN SAHLAN 73
8.4 ERROR CORRECTION MODEL
• If 𝑦𝑡−1 > 𝛽𝑥𝑡−1 , then 𝑦 in the previous period has overshoot
the equilibrium; the error correction term (ECT) works to push
𝑦 back toward the equilibrium.
• If 𝑦𝑡−1 < 𝛽𝑥𝑡−1 , the ECT induce a positive change in 𝑦 back
toward the equilibrium.

RIZAUDIN SAHLAN 74
8.4 ERROR CORRECTION MODEL

Example : Error Correction Model for holding yields


• For example, let use the data in INTQRT.dta
• Let the model is;

𝑕𝑦6𝑡 = 𝛽0 + 𝛽1 𝑕𝑦3𝑡 + 𝑢𝑡 (8.4.4)

where;
𝑕𝑦6 = three-month holding yield (in percent)
𝑕𝑦3𝑡 = three month holding yield (in percent)

RIZAUDIN SAHLAN 75
8.4 ERROR CORRECTION MODEL

Source SS df MS Number of obs = 123


F(1, 121) = 125.69
Model 49.9916061 1 49.9916061 Prob > F = 0.0000
Residual 48.1253897 121 .397730494 R-squared = 0.5095
Adj R-squared = 0.5055
Total 98.1169958 122 .804237671 Root MSE = .63066

hy6 Coef. Std. Err. t P>|t| [95% Conf. Interval]

hy3 .851402 .0759417 11.21 0.000 .7010553 1.001749


_cons .3392569 .1352218 2.51 0.013 .0715497 .6069641

RIZAUDIN SAHLAN 76
8.4 ERROR CORRECTION MODEL
• It turns out that there is evidence of a unit root in 𝑕𝑦3 and
𝑕𝑦6. (both are I(1) processes)
ADF test with 1 lags on 𝑕𝑦6 at level form
Augmented Dickey-Fuller test for unit root Number of obs = 121

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -3.384 -3.503 -2.889 -2.579

MacKinnon approximate p-value for Z(t) = 0.0115

ADF test with 1 lags on 𝑕𝑦3 at level form


Augmented Dickey-Fuller test for unit root Number of obs = 122

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -2.250 -3.503 -2.889 -2.579

MacKinnon approximate p-value for Z(t) = 0.1887


RIZAUDIN SAHLAN 77
8.4 ERROR CORRECTION MODEL
ADF test with 1 lags on 𝑕𝑦6 at first difference
Augmented Dickey-Fuller test for unit root Number of obs = 120

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -14.709 -3.503 -2.889 -2.579

MacKinnon approximate p-value for Z(t) = 0.0000

ADF test with 1 lags on 𝑕𝑦3 at first difference

Augmented Dickey-Fuller test for unit root Number of obs = 121

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -10.294 -3.503 -2.889 -2.579

MacKinnon approximate p-value for Z(t) = 0.0000

RIZAUDIN SAHLAN 78
8.4 ERROR CORRECTION MODEL
• The expectations hypothesis implies, at minimum, that 𝑕𝑦3𝑡
and 𝑕𝑦6𝑡 are cointegrated with 𝛽 equal to one.
• And then, we test for the cointegration for the estimated
residual;
𝑕𝑦6𝑡 = 𝛽0 + 𝛽1 𝑕𝑦3𝑡 + 𝑢𝑡
𝑢𝑡 = 𝑕𝑦6𝑡 − 𝛽0 − 𝛽1 𝑕𝑦3𝑡

and perform the DF test for the residual

∆𝑢𝑡 = 𝜃𝑢𝑡−1 + 𝜀𝑡

RIZAUDIN SAHLAN 79
8.4 ERROR CORRECTION MODEL
DF test for the residual in level form without constant;
Dickey-Fuller test for unit root Number of obs = 122

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -11.411 -2.597 -1.950 -1.611

D.uhat Coef. Std. Err. t P>|t| [95% Conf. Interval]

uhat
L1. -1.036268 .0908161 -11.41 0.000 -1.216062 -.8564734

• The results show that the 𝜏𝑠 is -11.411 and the critical value
from EG Table C for two variables and 5% significance level is
-3.398 which means null hypothesis is rejected and 𝑢𝑡 ~𝐼(0).

RIZAUDIN SAHLAN 80
8.4 ERROR CORRECTION MODEL
• Or, we use the command egranger for test cointegration;
Engle-Granger test for cointegration N (1st step) = 123
N (test) = 122

Test 1% Critical 5% Critical 10% Critical


Statistic Value Value Value

Z(t) -11.411 -3.988 -3.387 -3.079

Critical values from MacKinnon (1990, 2010)

Engle-Granger 1st-step regression

hy6 Coef. Std. Err. t P>|t| [95% Conf. Interval]

hy3 .851402 .0759417 11.21 0.000 .7010553 1.001749


_cons .3392569 .1352218 2.51 0.013 .0715497 .6069641

Engle-Granger test regression

D._egresid Coef. Std. Err. t P>|t| [95% Conf. Interval]

_egresid
L1. -1.036268 .0908161 -11.41 0.000 -1.216062 -.8564734

• Both test results show that the variables 𝑕𝑦6 and 𝑕𝑦3 is
cointegrated or there is a long-run relationship between
them. RIZAUDIN SAHLAN 81
8.4 ERROR CORRECTION MODEL
• The expectations hypothesis implies, at minimum, that 𝑕𝑦3𝑡
and 𝑕𝑦6𝑡 are cointegrated with 𝛽 equal to one.
• Under this assumption, an ECM can be written as below;

∆𝑕𝑦6𝑡 = 𝛼0 + ∆𝑕𝑦3𝑡 + 𝛿𝑢𝑡−1 + 𝑣𝑡


(8.4.5)

where 𝑣𝑡 has zero mean, and 𝑢𝑡−1 an error correction or


cointegration vector.

RIZAUDIN SAHLAN 82
8.4 ERROR CORRECTION MODEL

Source SS df MS Number of obs = 122


F(2, 119) = 1029.31
Model 62.0953425 2 31.0476713 Prob > F = 0.0000
Residual 3.58947534 119 .030163658 R-squared = 0.9454
Adj R-squared = 0.9444
Total 65.6848179 121 .542849734 Root MSE = .17368

D.hy6 Coef. Std. Err. t P>|t| [95% Conf. Interval]

hy3
D1. -1.086571 .0504964 -21.52 0.000 -1.186559 -.9865829

uhat
L1. -.9540214 .0251293 -37.96 0.000 -1.00378 -.9042629

_cons .021083 .0157321 1.34 0.183 -.0100681 .0522341

RIZAUDIN SAHLAN 83
8.4 ERROR CORRECTION MODEL
• The ECT is negative and very significance.
• Significance means that there is adjustment in the short-run
to make the model equilibrium in the long-run.
• If not significance, the model is already in equilibrium state
and no need the adjustment in short-run.
• For example, if the holding yield on six-month T-bills is above
that for three-month T-bills by one point, 𝑕𝑦6 falls by 0.950
points on average in the next quarter (𝑡).

RIZAUDIN SAHLAN 84
8.5 CAUSALITY IN ECONOMICS:
THE GRANGER CAUSALITY TEST

• To explain the Granger test, we will consider the often asked


question in macroeconomics:
– Is it GDP that “causes” the money supply M (GDP→ M)
– is it the money supply M that causes GDP (M→GDP)

• The Granger causality test assumes that the information


relevant to the prediction of the respective variables, GDP and
M, is contained solely in the time series data on these
variables.
RIZAUDIN SAHLAN 85
8.5 CAUSALITY IN ECONOMICS:
THE GRANGER CAUSALITY TEST
• The test involves estimating the following pair of regressions:
𝐺𝐷𝑃𝑡 = 𝑛𝑖=1 𝛼𝑖 𝑀𝑡−𝑖 + 𝑛𝑗=1 𝛽𝑖 𝐺𝐷𝑃𝑡−𝑖 + 𝑢1𝑡 (8.5.1)
𝑛 𝑛
𝑀𝑡 = 𝑖=1 𝜆𝑖 𝑀𝑡−𝑖 + 𝑗=1 𝛿𝑖 𝐺𝐷𝑃𝑡−𝑖 + 𝑢2𝑡 (8.5.2)

assumed that the disturbances 𝑢1𝑡 and 𝑢2𝑡 are uncorrelated


• We have two variables, we are dealing with bilateral
causality.
• Equation (8.5.1) postulates that current GDP is related to past
values of itself as well as that of M.
• Equation (8.5.2) postulates that current M is related to past
values of itself as well as that of GDP

RIZAUDIN SAHLAN 86
8.5 CAUSALITY IN ECONOMICS:
THE GRANGER CAUSALITY TEST
• We now distinguish four cases;
• Unidirectional causality from M to GDP – estimated
coefficients on the lagged M in (8.5.1) are statistically
different from zero as a group 𝛼𝑖 ≠ 0 ; estimated
coefficients on the lagged GDP in (8.5.2) is not statistically
different from zero as a group 𝛿𝑖 = 0 .

• Unidirectional causality from GDP to M – estimated


coefficients on the lagged M in (8.5.1) are not statistically
different from zero as a group 𝛼𝑖 = 0 ; estimated
coefficients on the lagged GDP in (8.5.2) is statistically
different from zero as a group 𝛿𝑖 ≠ 0 .

RIZAUDIN SAHLAN 87
8.5 CAUSALITY IN ECONOMICS:
THE GRANGER CAUSALITY TEST
• Feedback, or bilateral causality, is suggested when the sets of
M and GDP coefficients are statistically significantly different
from zero in both regressions. 𝛼𝑖 ≠ 0 and 𝛿𝑖 ≠ 0 .

• Finally, independence is suggested when the sets of M and


GDP coefficients are not statistically significant in both the
regressions. . 𝛼𝑖 = 0 and 𝛿𝑖 = 0

RIZAUDIN SAHLAN 88
8.5 CAUSALITY IN ECONOMICS:
THE GRANGER CAUSALITY TEST
• More generally, since the future cannot predict the past, if
variable X (Granger) causes variable Y, then changes in X
should precede changes in Y.
• Therefore, in a regression of Y on other variables (including its
own past values) if we include past or lagged values of X and it
significantly improves the prediction of Y, then we can say
that X (Granger) causes Y.
• A similar definition applies if Y (Granger) causes X.
• The steps involved in implementing the Granger causality test
are as follows.
• We illustrate these steps with the GDP-money example given
in Eq. (8.5.1)

RIZAUDIN SAHLAN 89
8.5 CAUSALITY IN ECONOMICS:
THE GRANGER CAUSALITY TEST
1. Regress current GDP on all lagged GDP terms and other
variables, if any, but do not include the lagged M variables in
this regression (restricted regression). Obtain the restricted
residual sum of squares, 𝑅𝑆𝑆𝑅 .
2. Run the regression including the lagged M terms
(unrestricted regression). Obtain the unrestricted residual
sum of squares, 𝑅𝑆𝑆𝑈𝑅 .
3. The null hypothesis is 𝐻0 : 𝛼𝑖 ≠ 0 , that is, lagged M terms
do not belongin the regression.

RIZAUDIN SAHLAN 90
8.5 CAUSALITY IN ECONOMICS:
THE GRANGER CAUSALITY TEST
4. To test this hypothesis, we apply the F test;

(8.5.3)
follows the F distribution with m and (n− k) df. and m is
equal to the number of lagged M terms and k is the
number of parameters estimated in the unrestricted
regression.
5. If the computed F value exceeds the critical F value at the
chosen level of significance, we reject the null hypothesis, in
which case the lagged M terms belong in the regression. This
is another way of saying that M causes GDP.
6. Steps 1 to 5 can be repeated to test the model (8.5.2), that
is,whether GDP causes M. RIZAUDIN SAHLAN 91
8.5 CAUSALITY IN ECONOMICS:
THE GRANGER CAUSALITY TEST
• Before we illustrate the Granger causality test, there are
several things that need to be noted:
1. It is assumed that the two variables, GDP and M, are
stationary.
2. The number of lagged terms to be introduced in the causality
tests is an important practical question. Use the Akaike or
Schwarz information criterion to make the choice.
3. We have assumed that the error terms entering the causality
test are uncorrelated.
4. Since our interest is in testing for causality, one need not
present the estimated coefficients of models (8.5.1) and
(8.5.2) explicitly (to save space); just the results of the F test
given in (8.5.3) will suffice.
RIZAUDIN SAHLAN 92
8.5 CAUSALITY IN ECONOMICS:
THE GRANGER CAUSALITY TEST
Example : Causality test between industrial production and
stock prices
• We use the data in volat.dta.
• Let 𝑝𝑐𝑖𝑝 be the percentage change in industrial production
(yearly) and lets 𝑝𝑐𝑠𝑝 be the percentage change in stock
market (yearly).

𝑛 𝑛
𝑝𝑐𝑖𝑝𝑡 = 𝑖=1 𝛼𝑖 𝑝𝑐𝑠𝑝𝑡−𝑖 + 𝑗=1 𝛽𝑖 𝑝𝑐𝑖𝑝𝑡−𝑖 + 𝑢1𝑡 (8.5.4)
𝑛 𝑛
𝑝𝑐𝑠𝑝𝑡 = 𝑖=1 𝜆𝑖 𝑝𝑐𝑠𝑝𝑡−𝑖 + 𝑗=1 𝛿𝑖 𝑝𝑐𝑖𝑝𝑡−𝑖 + 𝑢2𝑡 (8.5.5)

RIZAUDIN SAHLAN 93
8.5 CAUSALITY IN ECONOMICS:
THE GRANGER CAUSALITY TEST
200
100
0
-100
-200

0 200 400 600


t

pct chg, IP, ann rate pct chg, sp500, ann rate

RIZAUDIN SAHLAN 94
8.5 CAUSALITY IN ECONOMICS:
THE GRANGER CAUSALITY TEST
• To perform the Granger causality test, we must make sure all
data must be stationary at same level.
• Lets we perform the ADF test for 𝑝𝑐𝑖𝑝 and 𝑝𝑐𝑠𝑝 variables.

• ADF test for 𝑝𝑐𝑖𝑝 in level form;

Dickey-Fuller test for unit root Number of obs = 556

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -15.544 -3.430 -2.860 -2.570

MacKinnon approximate p-value for Z(t) = 0.0000

RIZAUDIN SAHLAN 95
8.5 CAUSALITY IN ECONOMICS:
THE GRANGER CAUSALITY TEST
• ADF test for 𝑝𝑐𝑠𝑝 in level form;
. dfuller pcsp

Dickey-Fuller test for unit root Number of obs = 556

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -18.419 -3.430 -2.860 -2.570

MacKinnon approximate p-value for Z(t) = 0.0000

• The ADF test for 𝑝𝑐𝑖𝑝 and 𝑝𝑐𝑠𝑝 is already stationary at level
form, or 𝑝𝑐𝑖𝑝~𝐼 0 and 𝑝𝑐𝑠𝑝~𝐼 0 .

RIZAUDIN SAHLAN 96
8.5 CAUSALITY IN ECONOMICS:
THE GRANGER CAUSALITY TEST
• The equations in (8.5.4) and (8.5.5) show that the variables in
right-hand side is distributed with the number of lags in 𝑛.
• We need to know the number of optimum lags will be
included in (8.5.4) and (8.5.5) by the information criterion.
• To do this, we will used the Stata command varsoc.
Selection-order criteria
Sample: 10 - 558 Number of obs = 549

lag LL LR df p FPE AIC HQIC SBIC

0 -5006.4 287737 18.2456 18.2517 18.2612


1 -4940.47 131.87 4 0.000 229619 18.0199 18.0383 18.067*
2 -4932.05 16.835 4 0.002 225953 18.0038 18.0345* 18.0823
3 -4928.82 6.4625 4 0.167 226587 18.0066 18.0496 18.1165
4 -4923.01 11.622* 4 0.020 225098* 18* 18.0552 18.1413
5 -4920.96 4.1019 4 0.392 226703 18.0071 18.0746 18.1798
6 -4916.5 8.9271 4 0.063 226322 18.0055 18.0852 18.2095
7 -4914.89 3.2213 4 0.522 228303 18.0142 18.1062 18.2496
8 -4913.38 3.0187 4 0.555 230387 18.0232 18.1275 18.29

Endogenous: pcip pcsp


Exogenous: _cons

RIZAUDIN SAHLAN 97
8.5 CAUSALITY IN ECONOMICS:
THE GRANGER CAUSALITY TEST
• The information criterion for AIC shows that the optimum lags
is 4. So, this is number of lags we will include in our analysis
for (8.5.4) and (8.5.5).
• The, our model for Granger-causality test will become;

4 4
𝑝𝑐𝑖𝑝𝑡 = 𝑖=1 𝛼𝑖 𝑝𝑐𝑠𝑝𝑡−𝑖 + 𝑗=1 𝛽𝑖 𝑝𝑐𝑖𝑝𝑡−𝑖 + 𝑢1𝑡 (8.5.6)
4 4
𝑝𝑐𝑠𝑝𝑡 = 𝑖=1 𝜆𝑖 𝑝𝑐𝑠𝑝𝑡−𝑖 + 𝑗=1 𝛿𝑖 𝑝𝑐𝑖𝑝𝑡−𝑖 + 𝑢2𝑡 (8.5.7)

• Now, we will perform the Granger-causality test with the


number of lags been used is 4.

RIZAUDIN SAHLAN 98
8.5 CAUSALITY IN ECONOMICS:
THE GRANGER CAUSALITY TEST
• First, we test the direction for 𝑝𝑐𝑠𝑝 → 𝑝𝑐𝑖𝑝 in (8.5.6);

pcip Coef. Std. Err. t P>|t| [95% Conf. Interval]

pcsp
L1. .0225342 .0130618 1.73 0.085 -.0031236 .048192
L2. .0369286 .0135071 2.73 0.006 .0103961 .0634611
L3. .0093613 .0135427 0.69 0.490 -.017241 .0359636
L4. .0417713 .013154 3.18 0.002 .0159325 .0676101

pcip
L1. .3166854 .0424916 7.45 0.000 .2332176 .4001532
L2. .054438 .0444751 1.22 0.221 -.0329259 .141802
L3. .0681262 .0443053 1.54 0.125 -.0189042 .1551566
L4. .0214643 .0420152 0.51 0.610 -.0610676 .1039962

_cons 1.000451 .5675927 1.76 0.079 -.1144908 2.115393

• After we estimated (8.5.6) with the OLS, now we will apply


the F-test for the 𝛼𝑖 , where 𝑖 = 1, . . 4.

RIZAUDIN SAHLAN 99
8.5 CAUSALITY IN ECONOMICS:
THE GRANGER CAUSALITY TEST
• We will used the formula in 8.5.3 to calculate the F-statistics
and then we will compared the F-statistics with the F-critical
with the level of significance we chosen.
• If F-statistics > F-critical, reject the 𝐻0 with means that 𝑝𝑐𝑠𝑝 is
Granger-cause to 𝑝𝑐𝑖𝑝.
• But, this things will easy when we using Stata with command
test
F( 4, 544) = 6.70
Prob > F = 0.0000

• The test show that 𝐻0 is rejected. We had proof that 𝑝𝑐𝑠𝑝 is


Granger-cause to 𝑝𝑐𝑖𝑝. 𝑝𝑐𝑠𝑝 → 𝑝𝑐𝑖𝑝 .

RIZAUDIN SAHLAN 100


8.5 CAUSALITY IN ECONOMICS:
THE GRANGER CAUSALITY TEST
• Now, lets we test the direction for 𝑝𝑐𝑖𝑝 → 𝑝𝑐𝑠𝑝 in (8.5.7);

pcsp Coef. Std. Err. t P>|t| [95% Conf. Interval]

pcsp
L1. .2580261 .0428232 6.03 0.000 .173907 .3421453
L2. -.080877 .0442831 -1.83 0.068 -.1678638 .0061099
L3. .0228424 .0443996 0.51 0.607 -.0643733 .1100581
L4. .0552407 .0431252 1.28 0.201 -.0294717 .1399531

pcip
L1. -.072219 .1393088 -0.52 0.604 -.345868 .20143
L2. -.1342847 .1458115 -0.92 0.357 -.4207073 .1521379
L3. -.0853891 .1452548 -0.59 0.557 -.3707181 .1999399
L4. .0181298 .1377468 0.13 0.895 -.252451 .2887106

_cons 7.064827 1.860852 3.80 0.000 3.409491 10.72016

F( 4, 544) = 0.73
Prob > F = 0.5751

RIZAUDIN SAHLAN 101


8.5 CAUSALITY IN ECONOMICS:
THE GRANGER CAUSALITY TEST
• The results show that based on the F-test for coefficients 𝛿𝑖
where 𝑖 = 1, . . 4 in (8.5.7), the 𝐻0 is fail to rejected which
means 𝑝𝑐𝑖𝑝 is not Granger-cause to 𝑝𝑐𝑠𝑝.

• Our conclusion is, the Granger-causality test for (8.5.6) and


(8.5.7) show that there is only exists unidirectional causality
between 𝑝𝑐𝑖𝑝 and 𝑝𝑐𝑠𝑝, which the 𝑝𝑐𝑠𝑝 is Granger-cause to
𝑝𝑐𝑖𝑝, or 𝑝𝑐𝑠𝑝 → 𝑝𝑐𝑖𝑝 .

RIZAUDIN SAHLAN 102


8.5 CAUSALITY IN ECONOMICS:
THE GRANGER CAUSALITY TEST
• We also can get the same results with using the command
var follow by the command vargranger

Vector autoregression

Sample: 6 - 558 Number of obs = 553


Log likelihood = -4958.272 AIC = 17.99737
FPE = 224497 HQIC = 18.05224
Det(Sigma_ml) = 210346.7 SBIC = 18.13783

Equation Parms RMSE R-sq F P > F

pcip 9 11.9274 0.2050 17.53499 0.0000


pcsp 9 39.104 0.0714 5.232431 0.0000

RIZAUDIN SAHLAN 103


8.5 CAUSALITY IN ECONOMICS:
THE GRANGER CAUSALITY TEST
Coef. Std. Err. t P>|t| [95% Conf. Interval]

pcip
pcip
L1. .3166854 .0424916 7.45 0.000 .2332176 .4001532
L2. .054438 .0444751 1.22 0.221 -.0329259 .141802
L3. .0681262 .0443053 1.54 0.125 -.0189042 .1551566
L4. .0214643 .0420152 0.51 0.610 -.0610676 .1039962

pcsp
L1. .0225342 .0130618 1.73 0.085 -.0031236 .048192
L2. .0369286 .0135071 2.73 0.006 .0103961 .0634611
L3. .0093613 .0135427 0.69 0.490 -.017241 .0359636
L4. .0417713 .013154 3.18 0.002 .0159325 .0676101

_cons 1.000451 .5675927 1.76 0.079 -.1144908 2.115393

pcsp
pcip
L1. -.072219 .1393088 -0.52 0.604 -.345868 .20143
L2. -.1342847 .1458115 -0.92 0.357 -.4207073 .1521379
L3. -.0853891 .1452548 -0.59 0.557 -.3707181 .1999399
L4. .0181298 .1377468 0.13 0.895 -.252451 .2887106

pcsp
L1. .2580261 .0428232 6.03 0.000 .173907 .3421453
L2. -.080877 .0442831 -1.83 0.068 -.1678638 .0061099
L3. .0228424 .0443996 0.51 0.607 -.0643733 .1100581
L4. .0552407 .0431252 1.28 0.201 -.0294717 .1399531

_cons 7.064827 1.860852 3.80 0.000 3.409491 10.72016

RIZAUDIN SAHLAN 104


8.5 CAUSALITY IN ECONOMICS:
THE GRANGER CAUSALITY TEST

Granger causality Wald tests

Equation Excluded F df df_r Prob > F

pcip pcsp 6.6962 4 544 0.0000


pcip ALL 6.6962 4 544 0.0000

pcsp pcip .72505 4 544 0.5751


pcsp ALL .72505 4 544 0.5751

• Our conclusion is, the Granger-causality test for (8.5.6) and


(8.5.7) show that there is only exists unidirectional causality
between 𝑝𝑐𝑖𝑝 and 𝑝𝑐𝑠𝑝, which the 𝑝𝑐𝑠𝑝 is Granger-cause to
𝑝𝑐𝑖𝑝, or 𝑝𝑐𝑠𝑝 → 𝑝𝑐𝑖𝑝 .

RIZAUDIN SAHLAN 105

You might also like