Chapter 13 graphical techniques for detecting nonstationarity (EC220).

Download Report

Transcript Chapter 13 graphical techniques for detecting nonstationarity (EC220).

Christopher Dougherty
EC220 - Introduction to econometrics
(chapter 13)
Slideshow: graphical techniques for detecting nonstationarity
Original citation:
Dougherty, C. (2012) EC220 - Introduction to econometrics (chapter 13). [Teaching Resource]
© 2012 The Author
This version available at: http://learningresources.lse.ac.uk/139/
Available in LSE Learning Resources Online: May 2012
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. This license allows
the user to remix, tweak, and build upon the work even for commercial purposes, as long as the user
credits the author and licenses their new creations under the identical terms.
http://creativecommons.org/licenses/by-sa/3.0/
http://learningresources.lse.ac.uk/
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
Yt   0  1Yt 1   2Yt  2  ...   pYt  p  1 t  2 t 1  ...  q 1 t  q
Section 11.7 outlines the time series analysis approach to representing a time series as a
univariate ARMA(p, q) process, such as that shown above, for appropriate choice of p and
q.
6
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
Yt   0  1Yt 1   2Yt  2  ...   pYt  p  1 t  2 t 1  ...  q 1 t  q
Much earlier than conventional econometricians, time series analysts recognized the
importance of nonstationarity and the need for eliminating it by differencing.
6
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
Yt   0  1Yt 1   2Yt  2  ...   pYt  p  1 t  2 t 1  ...  q 1 t  q
With the need-for-differencing aspect in mind, the ARMA(p, q) model was generalized to the
ARIMA(p, d, q) model where d is the number of times the series has to be differenced to
render it stationary.
6
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
Yt   0  1Yt 1   2Yt  2  ...   pYt  p  1 t  2 t 1  ...  q 1 t  q
Autocorrelation function
k 
E ( X t   X )( X t  k   X )
E ( X t   X ) 2 E ( X t  k   X ) 2 
for k
= 1, ...
The key tool for determining d, and subsequently p and q, was the correlogram.
6
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
Yt   0  1Yt 1   2Yt  2  ...   pYt  p  1 t  2 t 1  ...  q 1 t  q
Autocorrelation function
k 
E ( X t   X )( X t  k   X )
E ( X t   X ) 2 E ( X t  k   X ) 2 
for k
= 1, ...
The autocorrelation function of a series Xt gives the theoretical correlation between the
value of a series at time t and its value at time t +k, for values of k from 1 to (typically) about
20, being defined as the series shown above, for k = 1, … The correlogram is its graphical
representation.
6
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
Yt   0  1Yt 1   2Yt  2  ...   pYt  p  1 t  2 t 1  ...  q 1 t  q
Autocorrelation function
k 
E ( X t   X )( X t  k   X )
E ( X t   X ) 2 E ( X t  k   X ) 2 
for k
= 1, ...
Autocorrelation function of an AR(1) process
X t  b 2 X t 1   t
 k  b 2k
For example, the autocorrelation function for an AR(1) process Xt = b2Xt–1 + t is k = b2k,
the coefficients decreasing exponentially with the lag provided that b2 < 1 and the process
is stationary.
6
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
1.0
Autocorrelation function
0.8
k 
E ( X t   X )( X t  k   X )
E ( X t   X ) 2 E ( X t  k   X ) 2 
for
k = 1, ...
0.6
X t  b 2 X t 1   t
0.4
 k  b 2k  0.8k
0.2
0.0
1
4
7
10
13
16
19
Correlogram of an AR(1) process
The figure shows the correlogram for this process with b2 = 0.8.
7
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
1.0
Autocorrelation function
0.8
k 
E ( X t   X )( X t  k   X )
E ( X t   X ) 2 E ( X t  k   X ) 2 
for
k = 1, ...
0.6
X t  b 2 X t 1   t
0.4
 k  b 2k  0.8k
0.2
0.0
1
4
7
10
13
16
19
Correlogram of an AR(1) process
Higher-order stationary AR(p) processes may exhibit a more complex mixture of damped
sine waves and damped exponentials, but they retain the feature that the weights eventually
decline to zero.
8
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
Yt   0  1Yt 1   2Yt  2  ...   pYt  p  1 t  2 t 1  ...  q 1 t  q
Autocorrelation function
k 
E ( X t   X )( X t  k   X )
E ( X t   X ) 2 E ( X t  k   X ) 2 
for k = 1, ...
Autocorrelation function of an MA(1) process
X t   t  a 2 t  1
a2
1 
1  a 22
By contrast, an MA(q) process has nonzero weights for only the first q lags and zero
weights thereafter. In particular, the first autocorrelation coefficient for the MA(1) process
Xt = t + a2t–1 is as shown and all subsequent autocorrelation coefficients are zero.
9
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
1.0
X t  X t 1   t
0.8
0.6
0.4
0.2
0.0
1
4
7
10
13
16
19
Correlogram of a random walk (T = 200)
In the case of nonstationary processes, the theoretical autocorrelation coefficients are not
defined but one may be able to obtain an expression for E(rk), the expected value of the
sample autocorrelation coefficients.
10
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
1.0
X t  X t 1   t
0.8
0.6
0.4
0.2
0.0
1
4
7
10
13
16
19
Correlogram of a random walk (T = 200)
For long time series, these coefficients decline slowly. For example, in the case of a
random walk, the correlogram for a series with 200 observations is as shown in the figure.
11
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
Yt   0  1Yt 1   2Yt  2  ...   pYt  p  1 t  2 t 1  ...  q 1 t  q
Time series analysts exploit this fact in a two-stage procedure for identifying the orders of a
series believed to be of the ARIMA(p, d, q) type.
12
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
Yt   0  1Yt 1   2Yt  2  ...   pYt  p  1 t  2 t 1  ...  q 1 t  q
In the first stage, if the correlogram exhibits slowly declining coefficients, the series is
differenced d times until the series exhibits a stationary pattern. Usually one differencing is
sufficient, and seldom more than two.
13
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
Yt   0  1Yt 1   2Yt  2  ...   pYt  p  1 t  2 t 1  ...  q 1 t  q
The second stage is to inspect the correlogram of the differenced series and its partial
correlogram, a related tool, to determine appropriate values for p and q.
14
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
Yt   0  1Yt 1   2Yt  2  ...   pYt  p  1 t  2 t 1  ...  q 1 t  q
This is not an exact science. It requires judgment, a reading of the tea-leaves, and different
analysts can come up with different values. However, when that happens, alternative
models are likely to imply similar forecasts, and that is what matters.
15
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
Yt   0  1Yt 1   2Yt  2  ...   pYt  p  1 t  2 t 1  ...  q 1 t  q
Time series analysis is a pragmatic approach to forecasting. As Box, a leading exponent,
once said, “All models are wrong, but some are useful.”
16
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
Yt   0  1Yt 1   2Yt  2  ...   pYt  p  1 t  2 t 1  ...  q 1 t  q
In any case, the complexity of the task is limited by the fact that in practice most series are
adequately represented by a process with the sum of p and q no greater than 2.
17
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
1.0
X t  X t 1   t
0.8
0.6
0.4
0.2
0.0
1
4
7
10
13
16
19
Correlogram of a random walk (T = 200)
There are, however, two problems with using correlograms to identify nonstationarity. One
is that a correlogram similar to that for a random walk, shown in the figure, could result
from a stationary AR(1) process with a high value of b2.
18
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
1.0
X t  X t 1   t
0.8
0.6
0.4
0.2
0.0
1
4
7
10
13
16
19
-0.2
-0.4
Correlogram of a random walk (T = 50)
The other is that the coefficients of a nonstationary process may decline quite rapidly if the
series is not long. This is illustrated in the figure, which shows the expected values of rk for
a random walk when the series has only 50 observations.
19
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
9.5
9.0
8.5
8.0
7.5
7.0
1959
1963
1967
1971
1975
1979
1983
1987
1991
1995
1999
2003
LGDPI
We will now look at an example. The figure showss the data for the logarithm of DPI for
1959–2003.
20
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
1
0.8
0.6
0.4
0.2
0
1
4
7
10
13
16
19
-0.2
Sample correlogram of LGDPI
This figure presents the sample correlogram.
21
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
1
0.8
0.6
0.4
0.2
0
1
4
7
10
13
16
19
-0.2
Sample correlogram of LGDPI
At first sight, the falling autocorrelation coefficients suggest a stationary AR(1) process with
a high value of b2.
22
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
1.0
1
X t  b 2 X t 1   t
0.8
 k  b 2k  0.8k
0.6
0.8
0.4
0.6
0.2
0.0
1
0.4
4
7
10
13
16
19
Correlogram of an AR(1) process
0.2
0
1
4
7
10
13
16
19
-0.2
Sample correlogram of LGDPI
Although the theoretical correlogram for such a process, shown inset, looks a little different
in that the coefficients decline exponentially to zero without becoming negative, a sample
correlogram would have negative values similar to those in the figure.
23
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
1.0
0.8
1
0.6
0.4
0.8
0.2
0.0
0.6
1
4
7
10
13
16
19
-0.2
-0.4
0.4
Correlogram of a random walk (T = 50)
0.2
0
1
4
7
10
13
16
19
-0.2
Sample correlogram of LGDPI
However, the correlogram of LGDPI is also very similar to that for the finite nonstationary
process shown inset.
24
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
0.08
0.07
0.06
0.05
0.04
0.03
0.02
0.01
0.00
1960
1964
1968
1972
1976
1980
1984
1988
1992
1996
2000
-0.01
-0.02
First difference of LGDPI
This figure shows the differenced series, which appears to be stationary around a mean
annual growth rate of between 2 and 3 percent.
25
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
0.08
0.07
0.06
0.05
0.04
0.03
0.02
0.01
0.00
1960
1964
1968
1972
1976
1980
1984
1988
1992
1996
2000
-0.01
-0.02
First difference of LGDPI
Possibly there might be a downward trend, and equally possibly there might be a
discontinuity in the series at 1972, with a step down in the mean growth rate after the first
oil shock, but these hypotheses will not be investigated here.
26
GRAPHICAL TECHNIQUES FOR DETECTING NONSTATIONARITY
1
0.8
0.6
0.4
0.2
0
1
4
7
10
13
16
19
-0.2
-0.4
This figure shows the corresponding correlogram, whose low, erratic autocorrelation coefficients
provide support for the hypothesis that the differenced series is stationary.
27
Copyright Christopher Dougherty 2011.
These slideshows may be downloaded by anyone, anywhere for personal use.
Subject to respect for copyright and, where appropriate, attribution, they may be
used as a resource for teaching an econometrics course. There is no need to
refer to the author.
The content of this slideshow comes from Section 13.3 of C. Dougherty,
Introduction to Econometrics, fourth edition 2011, Oxford University Press.
Additional (free) resources for both students and instructors may be
downloaded from the OUP Online Resource Centre
http://www.oup.com/uk/orc/bin/9780199567089/.
Individuals studying econometrics on their own and who feel that they might
benefit from participation in a formal course should consider the London School
of Economics summer school course
EC212 Introduction to Econometrics
http://www2.lse.ac.uk/study/summerSchools/summerSchool/Home.aspx
or the University of London International Programmes distance learning course
20 Elements of Econometrics
www.londoninternational.ac.uk/lse.
11.07.25