0% found this document useful (0 votes)
54 views64 pages

Econometrics LL CH 2

Chapter 2 discusses basic regression with time series data, focusing on the nature of time series data, stationary and non-stationary processes, and various stochastic processes. It explains the concepts of trend stationary and difference stationary processes, highlighting the importance of understanding trends and fluctuations in economic data. The chapter also covers integrated stochastic processes and their implications for time series analysis.

Uploaded by

bereketwubie89
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views64 pages

Econometrics LL CH 2

Chapter 2 discusses basic regression with time series data, focusing on the nature of time series data, stationary and non-stationary processes, and various stochastic processes. It explains the concepts of trend stationary and difference stationary processes, highlighting the importance of understanding trends and fluctuations in economic data. The chapter also covers integrated stochastic processes and their implications for time series analysis.

Uploaded by

bereketwubie89
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

Chapter 2

Basic Regression with Time Series Data

Tadele Bayu

Bahir Dar Univ.

April 3, 2023
Contents
1 2.1. The nature of Time Series Data
2 2.2. Stationary and non-stationary stochastic Processes
3 2.3. Trend Stationary and Difference Stationary Stochastic
Processes
2.3.1. Pure random walk (without drift)
2.3.2. Pure random walk with Drift
2.3.3. Deterministic Trend stationary
4 2.4. Integrated Stochastic Process
5 2.5. Tests of Stationarity: The Unit Root Test
Transforming Non-stationary Time Series
6 Spurious regression and Co-integration
7 Co-integration:The Engle and Granger approach
Testing for Cointegration
Long run and Short run results
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 2 / 64
2.1. The nature of Time Series Data

2.1. The nature of Time Series Data


2
 The task facing modern time series econometricians is to de-
velop reasonably simple models capable of forecasting, inter-
preting, and testing hypothesis concerning economic data.
2
 The original use of time series analysis was primarily devel-
oped as an aid to forecasting.
2
 As such a methodology was developed to decompose a series
into trend, seasonal, cyclical, and an irregular component.

Trend : Tt = 1 + 0.1t (1)


Seasonal : St = 1.6sin(tπ/2) (2)
Irregular : It = 0.7It−1 (3)

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 3 / 64


2.1. The nature of Time Series Data

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 4 / 64


2.1. The nature of Time Series Data

Nature of Times series data


Time series data is ordered and indexed by time.
Time series data may exhibit trends, seasonal patterns,
cycles, or irregular fluctuations over time.
Time series data may be influenced by past values, i.e. they
may exhibit autocorrelation.
Time series data may have unequal time intervals between
observations.
Time series data may contain missing values or outliers.
Time series data may have non-constant variance or
non-normal distributions.
Time series data may be affected by structural breaks, i.e.
sudden changes in the underlying generating process.

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 5 / 64


2.1. The nature of Time Series Data

2
 A set of random variables indexed by time (such as Yt ) is
called a stochastic process or random process or time series
process.
2
 A random or stochastic process is a collection of random vari-
ables ordered in time.
2
 Hence, a sequence of random variables is called stochastic
process.
2
 A particular realization of the stochastic process is called a
time series.
Realization in time series similar to sample in cross-section.
2
 The set of all possible realizations in time series is akin to
population in cross-section.
Sample size in time series is the number of time periods over
which we observe the variable.

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 6 / 64


2.2. Stationary and non-stationary stochastic Processes

2.2. Stationary and non-stationary Processes


A stochastic process is said to be stationary if its mean and
variance are constant over time.

Mean :E(Yt ) = µ
Variance :Var (Yt ) = E(Yt − µ)2 = σ 2
Autocovariance function:
CoV (Yt , Yt+k ) = E [(Yt − µ)E(Yt+k − µ)] = γk

At k=0 ⇒ no lag,CoV (Yt , Yt+k ) = var (Yt ) = γ0 = σ 2


A non-stationary series is one in which the statistical proper-
ties of the series change over time.
It has a mean, variance, and/or covariance that vary over
time. This means that the distribution of the data is not
consistent over time.
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 7 / 64
2.3. Trend Stationary and Difference Stationary Stochastic
Processes

2.3. Trend Stationary and Difference


Stationary Stochastic Processes
2
 If the trend in a time series is a deterministic function of time,
such as time (t), time-squared (t 2 ) etc., we call it a determinis-
tic trend, whereas if it is not predictable, we call it a stochastic
trend.
2
 To make the definition more formal, consider the following model
of the time series Yt

General Model

Yt = β1 + β2 t + β3 Yt−1 + Ut

2
 Where Ut is a white noise error term and where t is time mea-
sured chronologically.
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 8 / 64
2.3. Trend Stationary and Difference Stationary Stochastic
Processes 2.3.1. Pure random walk (without drift)

2.3.1. Pure random walk (without drift)


The random walk model without drift is a time series model
that is often used to describe the behavior of a variable that
follows a pattern of random movements over time.
The model assumes that the variable follows a simple recur-
sive process, where each value of the variable is equal to the
previous value plus a random shock:

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 9 / 64


2.3. Trend Stationary and Difference Stationary Stochastic
Processes 2.3.1. Pure random walk (without drift)

2.3.1. Pure random walk (without drift)


Pure random walk (without drift):Yt = Yt−1 + Ut
Yt = β1 + β2 t + β3 Yt−1 + Ut
β1 = 0, β2 = 0, & β3 = 1

Let y0 is the initial value of yt


y1 = y0 + U1 (4)
y2 = y1 + U2 = y0 + U1 + U2
..
.
yT = yT −1 + UT = y0 + U1 + · · · + UT
T
X
yT = y0 + Ut shows infinite memory
t=1

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 10 / 64


2.3. Trend Stationary and Difference Stationary Stochastic
Processes 2.3.1. Pure random walk (without drift)

1 We can show that:


T
!
X
E(Yt ) = E y0 + Ut
t=1
= E(y0 ) + E(U1 ) + E(U2 ) + · · · + E(Ut ) = y0 , ∀ t ≥1
2 Though the mean of yt is constant (can also be zero if y0
is set at zero which is the normal practice) the variance in-
creases with time. Given IID error term (White Noise)
var(Yt ) = var(y0 ) + var(U1 ) + var(U2 ) + · · · + var(Ut ) = tσ 2
3 Thus, the random walk model without drift is a non stationary
stochastic process.
4 A RWM without drift is a difference stationary process (DSP).
∆Yt = Yt − Yt−1 = Ut
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 11 / 64
2.3. Trend Stationary and Difference Stationary Stochastic
Processes 2.3.2. Pure random walk with Drift

2.3.2.Pure random walk with Drift


A pure random walk with drift but no trend is a time series
model that assumes a systematic drift or tendency for the
variable to increase or decrease over time, but with no
additional trend component.
The model assumes that the variable follows a simple recur-
sive process, where each value of the variable is equal to
the previous value plus a random shock and a constant drift
term:

Yt = Yt−1 + β1 + Ut

where Yt is the value of the variable at time t, Yt−1 is the


value of the variable at the previous time period (t − 1), β1 is
the drift term, and Ut is a random error term.
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 12 / 64
2.3. Trend Stationary and Difference Stationary Stochastic
Processes 2.3.2. Pure random walk with Drift

2.3.2.Pure random walk with Drift


The drift term β1 represents a systematic tendency for the
variable to increase or decrease over time, regardless of its
previous values.
Yt = β + Yt−1 + Ut

y1 = β + y0 + U1
y2 = β + y1 + U2 = β + β + y0 + U1 + U2
y3 = β + y2 + U3 = β + β + β + y0 + U1 + U2 + U3
..
.
yT = β + β + β + · · · + β + y0 + U1 + U2 + U3 + · · · + UT
T
X T
X T
X
yT == y0 + β+ Ut = y0 + tβ + Ut
t=1 t=1 t=1

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 13 / 64


2.3. Trend Stationary and Difference Stationary Stochastic
Processes 2.3.2. Pure random walk with Drift

Yt will exhibit a positive (β1 > 0) or a negative (β1 < 0) trend.


Such a trend is called a stochastic trend.
It is a DSP process because the non-stationarity in Yt can
be eliminated by taking first differences of the time series.

∆Yt = Yt − Yt−1 = β1 + Ut

A difference stationary process, therefore, is one in which


the mean and/or variance of the time series are not constant
over time, but the first difference of the series is stationary.
This means that the series may have a trend, seasonal fluc-
tuations, or other nonstationary patterns, but these patterns
are due to random fluctuations and can be removed by
taking the first difference of the series.

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 14 / 64


2.3. Trend Stationary and Difference Stationary Stochastic
Processes 2.3.3. Deterministic Trend stationary

Trend stationary

A trend stationary process is one in which the mean or


variance of the time series are constant over time, but there
is a trend or systematic pattern in the data that is not station-
ary.
This means that the series may have a linear or nonlinear
trend, but the trend itself is stable over time.
An example of a trend stationary process is real GDP, which
tends to grow over time but at a relatively constant rate.
In this case, taking the first difference of the series would
not remove the trend because the trend is not due to ran-
dom fluctuations but rather reflects the underlying growth of
the economy.

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 15 / 64


2.3. Trend Stationary and Difference Stationary Stochastic
Processes 2.3.3. Deterministic Trend stationary

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 16 / 64


2.3. Trend Stationary and Difference Stationary Stochastic
Processes 2.3.3. Deterministic Trend stationary

Deterministic Trend stationary


Deterministic trend:Yt = β1 + β2 t + β3 Yt−1 + Ut

β1 6= 0 β2 6= 0 β3 = 0

Yt = β1 + β2 t + Ut

Which is called a trend stationary process (TSP)


Although the mean of Yt = β1 + β2 t, which is not constant,
its variance is constant (δ 2 ).
If we subtract the mean of Yt from Yt , the resulting series
will be stationary, hence the name trend stationary.
This procedure of removing the (deterministic) trend is called
detrending.

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 17 / 64


2.3. Trend Stationary and Difference Stationary Stochastic
Processes 2.3.3. Deterministic Trend stationary

RW with drift and stochastic trend

Random walk with drift and stochastic trend:

β1 6= 0 β2 6= 0 β3 = 1

Yt = β1 + β2 t + β3 Yt−1 + Ut (5)
Yt = β1 + β2 t + Yt−1 + Ut (6)

∆Yt = β1 + β2 t + Ut

It shows that Yt is non stationary.

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 18 / 64


2.3. Trend Stationary and Difference Stationary Stochastic
Processes 2.3.3. Deterministic Trend stationary

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 19 / 64


2.3. Trend Stationary and Difference Stationary Stochastic
Processes 2.3.3. Deterministic Trend stationary

As you can see from the figure , in the case of


the deterministic trend, the deviations from the
trend line (which represents nonstationary mean)
are purely random and they die out quickly; they
do not contribute to the long-run development of
the time series, which is determined by the trend
component 0.5t.
In the case of the stochastic trend, on the other
hand, the random component ut affects the long-
run course of the series Yt .

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 20 / 64


2.4. Integrated Stochastic Process

2.4. Integrated Stochastic Process

2
 The random walk model is a specific case of a more gen-
eral class of stochastic processes known as integrated pro-
cesses.
2
 The RWM without drift is non-stationary, but its first differ-
ence is stationary.
Hence, it is integrated of order 1,denoted as I(1).
2
 If a time series has to be differenced twice (i.e., take the first
difference of the first differences) to make it stationary, we call
such a time series integrated of order 2.
 A time series Yt integrated of order d is denoted as Yt ∼ I(d)
2

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 21 / 64


2.4. Integrated Stochastic Process

Properties of Integrated Series

Let Xt , Yt and Zt be three time series while a and b are con-


stants
1 If Xt ∼ I(0) and Yt ∼ I(1),then Zt = Xt + Yt ∼ I(1)
A linear combination or sum of stationary
and non-stationary time series is
non-stationary
2 If Xt ∼ I(d) and Zt = a + bXt ∼ I(d)
A linear combination of an I(d) series is also I(d)
3 If Xt ∼ I(d1 ) and Yt ∼ I(d2 ) ,then Zt = aXt + bYt ∼ I(d2 ),
where d1 < d2
4 If Xt ∼ I(d) and Yt ∼ I(d) ,then Zt = aXt + bYt ∼ I(d ∗ ),
generally d ∗ = d but in some cases d ∗ < d (Cointegartion)

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 22 / 64


2.4. Integrated Stochastic Process

How do we find out if a given


time series is stationary?

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 23 / 64


2.4. Integrated Stochastic Process

Graphical Analysis and Formal Test


Graphical illustration gives an initial clue about
the likely nature of the time series.
One simple test of stationarity is based on the so-
called autocorrelation function (ACF). The ACF at
lag k, denoted by ρk , is defined as
γk
ρk =
γ0
covariance at lag k
= if k = 0, ρ0 = 1
variance
If we plot ρk against k, the graph we obtain is known
as the population correlogram.
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 24 / 64
2.4. Integrated Stochastic Process

Graphical Analysis and Formal Test


Since in practice we only have a realization (i.e., sample)
of a stochastic process, we can only compute the sample
autocorrelation function (SAFC), ρ̂k
To compute this, we must first compute the sample covari-
ance at lag k, and γ̂k and the sample variance γ̂0
(Yt − Ȳ )2
P P
(Yt − Ȳ )(Yt+k − Ȳ )
γ̂k = γ̂0 =
n n
Therefore, the sample autocorrelation function at lag k is
γ̂k
ρ̂k =
γ̂0

If we plot ρ̂k against k, the graph we obtain is known as the


sample correlogram.
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 25 / 64
2.4. Integrated Stochastic Process

Autocorrelation and Correlogram


1 The plot of autocorrelation function and time lag is called
correlogram.
The horizontal scale is the lag and the vertical axis is the
autocorrelation coefficient.
2 It measures the correlation between the series and its
past values.
Lag 1 autocorrelation is between y1 and yt−1
Lag 2 autocorrelation is between y1 and yt−2
3 If the series has a trend yt and yt−k are highly correlated.
4 If ac is close to 0 successive series are not related.

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 26 / 64


2.4. Integrated Stochastic Process

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 27 / 64


2.4. Integrated Stochastic Process

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 28 / 64


2.4. Integrated Stochastic Process

Statistical Significance of Autocorrelation


Coefficients
Bartlett1 has shown that if a time series is purely random,
that is, it exhibits white noise , the sample autocorrelation
coefficients ρ̂k are approximately

ρ̂k ∼ N(0, 1/n)

that is, in large samples the sample autocorrelation coeffi-


cients are normally distributed with zero mean and variance
equal to one over the sample.
1
Maurice Stevenson Bartlett, “On the Theoretical Specification of
Sampling Properties of Autocorrelated Time Series,” Journal of the Royal
Statistical Society, Series B, vol. 27, 1946, pp. 27–41
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 29 / 64
2.4. Integrated Stochastic Process

Example
Suppose we have 88 observations decide whether the cor-
relation coefficient of 0.638 at lag 10 (quarters) is statistically
significant or not at 95% CI?
Solution
r
1
ρ̂k ± 1.96
88
ρ̂k ± 1.96 × (0.1066)
0.638 ± 0.2089 ⇒ (0.4291, 0.8469)

Suggesting that we are 95% confident that the true ρ̂10 is


significantly different from zero
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 30 / 64
2.4. Integrated Stochastic Process

Note that alternatively, if you divide the estimated


p
value of any ρk by the standard error of 1/n for
sufficiently large n, you will obtain the standard Z
value, whose probability can be easily obtained
from the standard normal table.
Solution

ρ̂10 0.638
Z =p = = 5.98
1/n 0.1066

Compare this value with the tabular value of Z.

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 31 / 64


2.4. Integrated Stochastic Process

Group Test
Instead of testing the statistical significance of any individual
autocorrelation coefficient, we can test the joint hypothesis
that all the ρk up to certain lags are simultaneously equal to
zero.
This can be done by using the Q statistic developed by Box
and Pierce, which is defined as
X m
Q=n ρ̂2k
k =1
where n = sample size and m = lag length
In large samples, it is approximately distributed as the chi-
square distribution with m df.
If the computed Q exceeds the critical Q value from the
chi-square distribution , reject the null hypothesis that all the
(true) ρk are zero; at least some of them must be nonzero.
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 32 / 64
2.4. Integrated Stochastic Process

AC, PAC and Q statistic

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 33 / 64


2.4. Integrated Stochastic Process

Alternative to Q statistics

A variant of the Box–Pierce Q statistic is the Ljung–Box


(LB) statistic, which is defined as :
m 
ρ̂2k
X 
LB = n(n + 2) + ∼ χ2 m
n−k
k =1

Although in large samples both Q and LB statistics follow the


chi-square distribution with m df, the LB statistic has been
found to have better (more powerful, in the statistical
sense) small sample properties than the Q statistic.

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 34 / 64


2.4. Integrated Stochastic Process

Which test is commonly used


in research and available in
statistical packages such as
STATA And EVIEWS?

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 35 / 64


2.5. Tests of Stationarity: The Unit Root Test

2.5. Tests of Stationarity: The Unit Root Test


2
 The starting point is the unit root (stochastic) process
Yt = ρYt−1 + Ut −1≤ρ≤1
We know that if ρ = 1, that is, in the case of the unit root,
becomes a random walk model without drift, which we
know is a non-stationary stochastic process.
H0 :ρ = 1 ⇒ The series is non stationary
H1 :ρ < 1 ⇒ The series is stationary
2
 However, in cases of non-stationary time series, the t test is
severely biased toward zero.
2
 To circumvent this, subtract Yt−1 from both sides
Yt − Yt−1 = ρYt−1 − Yt−1 + Ut
= (ρ − 1)Yt−1 + Ut ⇒ ∆Y = δYt−1 + Ut
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 36 / 64
2.5. Tests of Stationarity: The Unit Root Test

Which can be alternatively written as:

∆Yt = δYt−1 + Ut

H0 :δ = 0 ≈ ρ = 1 ⇒ The series is non stationary


H1 :δ < 0 ⇒ The series is stationary

Dickey and Fuller have shown that under the null hypothesis
that δ = 0 the estimated t value of the coefficient of Yt−1
follows the τ (tau) statistic.
This test is known as Dickey–Fuller (DF) test, in honour of
its discoverers.
David Alan Dickey and Wayne Arthur Fuller (1979)
We noted that a random walk process may have no drift,
or it may have drift, or it may have both deterministic and
stochastic trends.
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 37 / 64
2.5. Tests of Stationarity: The Unit Root Test

DF Unit Root Test

Yt is a random walk:

∆Yt = δYt−1 + Ut

Yt is a random walk with drift:

∆Yt = β1 + δYt−1 + Ut

Yt is a random walk with around a deterministic trend:

∆Yt = β1 + β2 t + δYt−1 + Ut

H0 : δ = 0 H1 : δ < 0

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 38 / 64


2.5. Tests of Stationarity: The Unit Root Test

The Augmented Dickey–Fuller (ADF) Test


The Dickey–Fuller test involves fitting the model
yt = β0 + β1 t + ρyt−1 + υt (7)
By OLS, perhaps setting β0 = 0 or β1 = 0
However, such a regression is likely to be plagued by serial
correlation. To control for that, the augmented Dickey–Fuller
test instead fits a model of the form
∆Yt = β1 + β2 t + δYt−1 + θ1 ∆Yt−1 + ..., θk ∆Yt−k + εt
k
X
∆Yt = β1 + β2 t + δYt−1 + θi ∆Yt−i + εt
i=1

Where εt is a pure white noise error term


where k is the number of lags specified
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 39 / 64
2.5. Tests of Stationarity: The Unit Root Test

2.5.1. Interpreting the DF Result

 If the computed |τ | does not exceed the absolute critical tau


value, we do not reject the null hypothesis, in which case the
time series is non-stationary.

|τ |Calculated < |τ |Tabulated

 In most applications the tau value will be negative.


 Therefore, alternatively we can say that if the computed (neg-
ative) tau value is smaller than (i.e., more negative than) the
critical tau value, we reject the null hypothesis (i.e., the time
series is stationary) otherwise, we do not reject it (i.e., the time
series is non-stationary).

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 40 / 64


2.5. Tests of Stationarity: The Unit Root Test

reg D.Lgdp year L.Lgdp


dfuller Lgdp ,trend

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 41 / 64


2.5. Tests of Stationarity: The Unit Root Test

How do you interpret your result ?


The computed value of -1.81 is smaller than the 5 percent
critical value of -3.43.
LGDP time series was non-stationary; i.e., it contained a unit
root, or it had a stochastic trend.

tsline Lgdp
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 42 / 64
2.5. Tests of Stationarity: The Unit Root Test Transforming Non-stationary Time Series

Transforming Non-stationary Time Series


To avoid the spurious regression problem that may arise from
regressing a non-stationary time series on one or more non-
stationary time series, we have to transform nonstationary
time series to make them stationary.
The transformation method depends on whether the time se-
ries are difference stationary (DSP) or trend stationary (TSP).
Difference-Stationary Processes
2
 If a time series has a unit root, the first differences of such time
series are stationary.

2
 If a time series is I(2), it will contain two unit roots, in which case we
will have to difference it twice.

2
 If it is I(d), it has to be differenced d times, where dis any integer.
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 43 / 64
2.5. Tests of Stationarity: The Unit Root Test Transforming Non-stationary Time Series

reg DD.Lgdp year DL.Lgdp


The computed value of -11.09 is greater than the 5 percent
critical value of -3.43.
DLGDP time series was non-stationary; i.e., it contained a
unit root, or it had a stochastic trend.

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 44 / 64


2.5. Tests of Stationarity: The Unit Root Test Transforming Non-stationary Time Series

Graph:tsline D.Lgdp

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 45 / 64


2.5. Tests of Stationarity: The Unit Root Test Transforming Non-stationary Time Series

Trend-Stationary Processes
How do you check stationarity using Engel-Granger approach
using Dicky Fuller?
Yt = β0 + β1 t + ut (8)
ubt = Yt − βb0 − βb1 t
ubt is known as a (linearly) detrended time series

∆Û = 7.18e − 06 −0.0271446 uhatt−1 (9)


SE 0.0006244 0.0149034
t 0.01 −1.82

Interpret your result?


Since the computed τ (= t) of -1.82 is less negative than the
critical value, we conclude that the first-differenced of uhat is
non stationary.
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 46 / 64
2.5. Tests of Stationarity: The Unit Root Test Transforming Non-stationary Time Series

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 47 / 64


2.5. Tests of Stationarity: The Unit Root Test Transforming Non-stationary Time Series

The figure tells us that the first differences of real log GDP is
stationary but the residuals from the trend line (uhat) are not.
If a time series is DSP but we treat it as TSP, this is called
under-differencing.
On the other hand, if a time series is TSP but we treat it as
DSP, this is called over-differencing.
If a time series is non-stationary, we can study its behavior
only for the time period under consideration.
Each set of time series data will therefore be for a particular
episode.
As a consequence, it is not possible to generalize it to other
time periods.
Therefore, for the purpose of forecasting, such
(non-stationary) time series may have little practical value.

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 48 / 64


Spurious regression and Co-integration

Spurious regression
Given two independent time series Yt and Xt generated by
random walk processes:
Yt = Yt−1 + uyt and Xt = Xt−1 + uxt (10)

If we then regress:
Yt = β0 + β1 Xt + ut where ut ≡ I(0) (11)

Testing the null hypothesis H0 : β1 = 0 ⇒ Yt = β0 + ut


Yt ∼ I(1) ⇒ ut ≡ I(1) (12)
Which is inconsistent with the previous (11) distributional
theory underlying OLS, such a regression is termed spurious
regression or nonsense regression.
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 49 / 64
Co-integration:The Engle and Granger approach

Co-integration: Engle and Granger approach


Economically speaking, two variables will be cointegrated if
they have a long-term, or equilibrium, relationship between
them.
In other words, two time series are said to be cointegrated if
their linear combination becomes stationary or it is I (0)series.
A test for cointegration can be thought of as a pre-test to
avoid ‘spurious regression’ situations.
If, in the regression:
Yt = β0 + β1 Xt + ut
ubt = Yt − βb0 − βb1 Xt

The linear combination of Yt and Xt are cointegrated, i.e.,


they are both I(1) provided that ubt = I(0).
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 50 / 64
Co-integration:The Engle and Granger approach

1 Cointegration tells us that Yt and Xt have a long-run relation-


ship (have the same wave length).
β1 measures the long-run coefficient (also called cointegrating
parameter).

Example

LPCEt = β0 + β1 LDPIt + ut
Where
LPCE = Log of Personal Consumption Expenditure
LDPI = Log of Gross Private Domestic Investment
ubt = LPCEt − βb0 − βb1 LDPIt

Cointegration means that despite being individually nonstationary, a linear combination of two or
more time series can be stationary.
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 51 / 64
Co-integration:The Engle and Granger approach Testing for Cointegration

Steps
If LPCE and LDPI are individually non stationary, there is the
possibility that this regression is spurious.
Check unit root on both LPCE and LDPI
Predict the residual and generate
Regress the first difference of the residual on
the first lag of the residual without a constant.
If the computed τ value is greater than the
given interpolated Dickey- Fuller critical value
LPCE and LDPI are cointegrated.
Estimate the error correction model.
Check diagnostic tests as usual (normality,
serial correlation, heteroscedasticity etc.)
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 52 / 64
Co-integration:The Engle and Granger approach Testing for Cointegration

Log of Personal Consumption Expenditure

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 53 / 64


Co-integration:The Engle and Granger approach Testing for Cointegration

Log of Gross Private Domestic Investment

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 54 / 64


Co-integration:The Engle and Granger approach Testing for Cointegration

Level

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 55 / 64


Co-integration:The Engle and Granger approach Testing for Cointegration

First Difference

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 56 / 64


Co-integration:The Engle and Granger approach Testing for Cointegration

Unit root test on the residual

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 57 / 64


Co-integration:The Engle and Granger approach Testing for Cointegration

What if we include a trend term ?


Since both the time series are trending, let us see what
happens if we add a trend variable to the model.
Let us reestimate including the trend variable and then see if
the residuals from this equation are stationary
Lpcet = −4.408564 + 0.003711year + 0.5843696LDPIt
SE 0.1841928 0.0001618 0.0186846
t −23.93 22.94 31.28
(13)
R 2 = 0.9994 Dw(3, 244) = 0.2956061
To see if the residuals from this regression are stationary, we
obtained the following results.

d ˆ
ût = −0.1498226ut−1 Dw(1, 243) = 2.393133 (14)
SE 0.0336338
t −4.45

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 58 / 64


Co-integration:The Engle and Granger approach Testing for Cointegration

STATA Result: Unit Root Test on The Residual

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 59 / 64


Co-integration:The Engle and Granger approach Testing for Cointegration

It seems that both LPCE and LPDI series have a unit root,
or stochastic trend.
Therefore, if we regress LPCE on LPDI, we might get a
spurious regression.
if we interpret the Durbin–Watson on its own, it would
suggest that the error term in this regression suffers from
first-order autocorrelation.

Balanced and Unbalanced


If two time series Y and X are integrated of different
orders then the error term in the regression of Y and X
is not stationary and this regression equation is said to
be un-balanced .
On the other hand, if the two variables are integrated
of the same order, then the regression equation is said
to be balanced .
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 60 / 64
Co-integration:The Engle and Granger approach Long run and Short run results

Long run Model


We just showed that LPCE and LDPI there is a long-term, or
equilibrium, relationship between the two.
Long run Model

LPCEt = β0 + β1 LDPIt + β2 t + Ut (15)

Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 61 / 64


Co-integration:The Engle and Granger approach Long run and Short run results

Error Correction Model (ECM)


Granger representation theorem
An important theorem, known as the Granger representation theo-
rem,states that if two variables Y and X are cointegrated, the relation-
ship between the two can be expressed as ECM.

∆LPCEt = α0 + α1 ∆LDPIt + δut−1 + εt

Where:
LPCEt = β0 + β1 LDPIt + β2 t + Ut (16)
Ut = LPCEt − β0 − β1 LDPIt − β2 t (17)

∆Lpce = .0061286 + 0.2967093∆LDPIt −0.1222933 U


b t−1 (18)
SE 0.0006334 0.0476402 0.0317964
t 9.68 6.23 −3.85
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 62 / 64
Co-integration:The Engle and Granger approach Long run and Short run results

1 Statistically, the ECM term is significant, suggesting that PCE


adjusts to DPI with a lag; only about 12 percent of the dis-
crepancy between long-term and short-term PCE is corrected
within a quarter (we have quarterly data).
2 The short-run consumption elasticity is about 0.29.
Gives the immediate, or short-run, impact of ∆LPDI on ∆LPCE
3 The long-run elasticity is about 0.58, which can be seen from
the result of reg Lpce Ldpi year.
It gives the long-run impact of lPDI on lPCE
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 63 / 64
Co-integration:The Engle and Granger approach Long run and Short run results

If the error term is zero, there will not be any disequilibrium


between the two variables and in that case the long-run
relationship.
If the equilibrium error term is nonzero, the relation-ship
between LPCE and LPDI will be out of equilibrium.
Suppose ∆LDPI is zero and ut−1 is positive. LPCt−1 is too
high to be in equilibrium.
Since δ is expected to be negative, the term δut−1 is negative
and, therefore,∆LPCEt will be negative to restore the equilib-
rium
If LPCEt is above its equilibrium value, it will start falling in the
next period to correct the equilibrium error; hence the name
ECM.
If ut−1 is negative (i.e., LPCE is below its equilibrium value)
δut−1 will be positive, which will cause ∆LPCEt to be positive,
leading LPCEt to rise in period t.
The absolute value of δ decides how quickly the equilibrium
is restored.
Tadele Bayu (Bahir Dar Univ.) Chapter 2 April 3, 2023 64 / 64

You might also like