Christopher Dougherty EC220 - Introduction to econometrics (chapter 12) Slideshow: autocorrelation Original citation: Dougherty, C.
Download ReportTranscript Christopher Dougherty EC220 - Introduction to econometrics (chapter 12) Slideshow: autocorrelation Original citation: Dougherty, C.
Slide 1
Christopher Dougherty
EC220 - Introduction to econometrics
(chapter 12)
Slideshow: autocorrelation
Original citation:
Dougherty, C. (2012) EC220 - Introduction to econometrics (chapter 12). [Teaching Resource]
© 2012 The Author
This version available at: http://learningresources.lse.ac.uk/138/
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/
Slide 2
AUTOCORRELATION
Y
1
X
Assumption C.5 states that the values of the disturbance term in the observations in the
sample are generated independently of each other.
1
Slide 3
AUTOCORRELATION
Y
1
X
In the graph above, it is clear that this assumption is not valid. Positive values tend to be
followed by positive ones, and negative values by negative ones. Successive values tend
to have the same sign. This is described as positive autocorrelation.
2
Slide 4
AUTOCORRELATION
Y
1
X
In this graph, positive values tend to be followed by negative ones, and negative values by
positive ones. This is an example of negative autocorrelation.
3
Slide 5
AUTOCORRELATION
Yt 1 2 X t ut
First-order autoregressive autocorrelation: AR(1)
u t u t 1 t
A particularly common type of autocorrelation, at least as an approximation, is first-order
autoregressive autocorrelation, usually denoted AR(1) autocorrelation.
8
Slide 6
AUTOCORRELATION
Yt 1 2 X t ut
First-order autoregressive autocorrelation: AR(1)
u t u t 1 t
It is autoregressive, because ut depends on lagged values of itself, and first-order, because
it depends only on its previous value. ut also depends on t, an injection of fresh
randomness at time t, often described as the innovation at time t.
8
Slide 7
AUTOCORRELATION
Yt 1 2 X t ut
First-order autoregressive autocorrelation: AR(1)
u t u t 1 t
Fifth-order autoregressive autocorrelation: AR(5)
u t 1 u t 1 2 u t 2 3 u t 3 4 u t 4 5 u t 5 t
Here is a more complex example of autoregressive autocorrelation. It is described as fifthorder, and so denoted AR(5), because it depends on lagged values of ut up to the fifth lag.
8
Slide 8
AUTOCORRELATION
Yt 1 2 X t ut
First-order autoregressive autocorrelation: AR(1)
u t u t 1 t
Fifth-order autoregressive autocorrelation: AR(5)
u t 1 u t 1 2 u t 2 3 u t 3 4 u t 4 5 u t 5 t
Third-order moving average autocorrelation: MA(3)
u t 0 t 1 t 1 2 t 2 3 t 3
The other main type of autocorrelation is moving average autocorrelation, where the
disturbance term is a linear combination of the current innovation and a finite number of
previous ones.
8
Slide 9
AUTOCORRELATION
Yt 1 2 X t ut
First-order autoregressive autocorrelation: AR(1)
u t u t 1 t
Fifth-order autoregressive autocorrelation: AR(5)
u t 1 u t 1 2 u t 2 3 u t 3 4 u t 4 5 u t 5 t
Third-order moving average autocorrelation: MA(3)
u t 0 t 1 t 1 2 t 2 3 t 3
This example is described as third-order moving average autocorrelation, denoted MA(3),
because it depends on the three previous innovations as well as the current one.
8
Slide 10
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t u t 1 t
We will now look at examples of the patterns that are generated when the disturbance term
is subject to AR(1) autocorrelation. The object is to provide some bench-mark images to
help you assess plots of residuals in time series regressions.
9
Slide 11
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t u t 1 t
We will use 50 independent values of , taken from a normal distribution with 0 mean, and
generate series for u using different values of .
10
Slide 12
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 0 u t 1 t
We have started with equal to 0, so there is no autocorrelation. We will increase
progressively in steps of 0.1.
11
Slide 13
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 1 u t 1 t
12
Slide 14
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 2 u t 1 t
13
Slide 15
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 3 u t 1 t
With equal to 0.3, a pattern of positive autocorrelation is beginning to be apparent.
14
Slide 16
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 4 u t 1 t
15
Slide 17
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 5 u t 1 t
16
Slide 18
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 6 u t 1 t
With equal to 0.6, it is obvious that u is subject to positive autocorrelation. Positive
values tend to be followed by positive ones and negative values by negative ones.
17
Slide 19
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 7 u t 1 t
18
Slide 20
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 8 u t 1 t
19
Slide 21
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 9 u t 1 t
With equal to 0.9, the sequences of values with the same sign have become long and the
tendency to return to 0 has become weak.
20
Slide 22
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 95 u t 1 t
The process is now approaching what is known as a random walk, where is equal to 1 and
the process becomes nonstationary. The terms ‘random walk’ and ‘nonstationary’ will be
defined in the next chapter. For the time being we will assume | | < 1.
21
Slide 23
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 0 u t 1 t
Next we will look at negative autocorrelation, starting with the same set of 50 independently
distributed values of t.
22
Slide 24
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 3 u t 1 t
We will take larger steps this time.
23
Slide 25
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 6 u t 1 t
With equal to –0.6, you can see that positive values tend to be followed by negative ones,
and vice versa, more frequently than you would expect as a matter of chance.
24
Slide 26
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 9 u t 1 t
Now the pattern of negative autocorrelation is very obvious.
25
Slide 27
AUTOCORRELATION
============================================================
Dependent Variable: LGHOUS
Method: Least Squares
Sample: 1959 2003
Included observations: 45
============================================================
Variable
Coefficient Std. Error t-Statistic Prob.
============================================================
C
0.005625
0.167903
0.033501
0.9734
LGDPI
1.031918
0.006649
155.1976
0.0000
LGPRHOUS
-0.483421
0.041780 -11.57056
0.0000
============================================================
R-squared
0.998583
Mean dependent var 6.359334
Adjusted R-squared
0.998515
S.D. dependent var 0.437527
S.E. of regression
0.016859
Akaike info criter-5.263574
Sum squared resid
0.011937
Schwarz criterion -5.143130
Log likelihood
121.4304
F-statistic
14797.05
Durbin-Watson stat
0.633113
Prob(F-statistic) 0.000000
============================================================
Next, we will look at a plot of the residuals of the logarithmic regression of expenditure on
housing services on income and relative price.
26
Slide 28
AUTOCORRELATION
0.04
0.03
0.02
0.01
0
1959
1963
1967
1971
1975
1979
1983
1987
1991
1995
1999
2003
-0.01
-0.02
-0.03
-0.04
This is the plot of the residuals of course, not the disturbance term. But if the disturbance
term is subject to autocorrelation, then the residuals will be subject to a similar pattern of
autocorrelation.
27
Slide 29
AUTOCORRELATION
0.04
0.03
0.02
0.01
0
1959
1963
1967
1971
1975
1979
1983
1987
1991
1995
1999
2003
-0.01
-0.02
-0.03
-0.04
You can see that there is strong evidence of positive autocorrelation. Comparing the graph
with the randomly generated patterns, one would say that is about 0.7 or 0.8.
28
Slide 30
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 12.1 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
Christopher Dougherty
EC220 - Introduction to econometrics
(chapter 12)
Slideshow: autocorrelation
Original citation:
Dougherty, C. (2012) EC220 - Introduction to econometrics (chapter 12). [Teaching Resource]
© 2012 The Author
This version available at: http://learningresources.lse.ac.uk/138/
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/
Slide 2
AUTOCORRELATION
Y
1
X
Assumption C.5 states that the values of the disturbance term in the observations in the
sample are generated independently of each other.
1
Slide 3
AUTOCORRELATION
Y
1
X
In the graph above, it is clear that this assumption is not valid. Positive values tend to be
followed by positive ones, and negative values by negative ones. Successive values tend
to have the same sign. This is described as positive autocorrelation.
2
Slide 4
AUTOCORRELATION
Y
1
X
In this graph, positive values tend to be followed by negative ones, and negative values by
positive ones. This is an example of negative autocorrelation.
3
Slide 5
AUTOCORRELATION
Yt 1 2 X t ut
First-order autoregressive autocorrelation: AR(1)
u t u t 1 t
A particularly common type of autocorrelation, at least as an approximation, is first-order
autoregressive autocorrelation, usually denoted AR(1) autocorrelation.
8
Slide 6
AUTOCORRELATION
Yt 1 2 X t ut
First-order autoregressive autocorrelation: AR(1)
u t u t 1 t
It is autoregressive, because ut depends on lagged values of itself, and first-order, because
it depends only on its previous value. ut also depends on t, an injection of fresh
randomness at time t, often described as the innovation at time t.
8
Slide 7
AUTOCORRELATION
Yt 1 2 X t ut
First-order autoregressive autocorrelation: AR(1)
u t u t 1 t
Fifth-order autoregressive autocorrelation: AR(5)
u t 1 u t 1 2 u t 2 3 u t 3 4 u t 4 5 u t 5 t
Here is a more complex example of autoregressive autocorrelation. It is described as fifthorder, and so denoted AR(5), because it depends on lagged values of ut up to the fifth lag.
8
Slide 8
AUTOCORRELATION
Yt 1 2 X t ut
First-order autoregressive autocorrelation: AR(1)
u t u t 1 t
Fifth-order autoregressive autocorrelation: AR(5)
u t 1 u t 1 2 u t 2 3 u t 3 4 u t 4 5 u t 5 t
Third-order moving average autocorrelation: MA(3)
u t 0 t 1 t 1 2 t 2 3 t 3
The other main type of autocorrelation is moving average autocorrelation, where the
disturbance term is a linear combination of the current innovation and a finite number of
previous ones.
8
Slide 9
AUTOCORRELATION
Yt 1 2 X t ut
First-order autoregressive autocorrelation: AR(1)
u t u t 1 t
Fifth-order autoregressive autocorrelation: AR(5)
u t 1 u t 1 2 u t 2 3 u t 3 4 u t 4 5 u t 5 t
Third-order moving average autocorrelation: MA(3)
u t 0 t 1 t 1 2 t 2 3 t 3
This example is described as third-order moving average autocorrelation, denoted MA(3),
because it depends on the three previous innovations as well as the current one.
8
Slide 10
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t u t 1 t
We will now look at examples of the patterns that are generated when the disturbance term
is subject to AR(1) autocorrelation. The object is to provide some bench-mark images to
help you assess plots of residuals in time series regressions.
9
Slide 11
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t u t 1 t
We will use 50 independent values of , taken from a normal distribution with 0 mean, and
generate series for u using different values of .
10
Slide 12
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 0 u t 1 t
We have started with equal to 0, so there is no autocorrelation. We will increase
progressively in steps of 0.1.
11
Slide 13
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 1 u t 1 t
12
Slide 14
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 2 u t 1 t
13
Slide 15
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 3 u t 1 t
With equal to 0.3, a pattern of positive autocorrelation is beginning to be apparent.
14
Slide 16
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 4 u t 1 t
15
Slide 17
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 5 u t 1 t
16
Slide 18
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 6 u t 1 t
With equal to 0.6, it is obvious that u is subject to positive autocorrelation. Positive
values tend to be followed by positive ones and negative values by negative ones.
17
Slide 19
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 7 u t 1 t
18
Slide 20
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 8 u t 1 t
19
Slide 21
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 9 u t 1 t
With equal to 0.9, the sequences of values with the same sign have become long and the
tendency to return to 0 has become weak.
20
Slide 22
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 95 u t 1 t
The process is now approaching what is known as a random walk, where is equal to 1 and
the process becomes nonstationary. The terms ‘random walk’ and ‘nonstationary’ will be
defined in the next chapter. For the time being we will assume | | < 1.
21
Slide 23
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 0 u t 1 t
Next we will look at negative autocorrelation, starting with the same set of 50 independently
distributed values of t.
22
Slide 24
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 3 u t 1 t
We will take larger steps this time.
23
Slide 25
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 6 u t 1 t
With equal to –0.6, you can see that positive values tend to be followed by negative ones,
and vice versa, more frequently than you would expect as a matter of chance.
24
Slide 26
AUTOCORRELATION
3
2
1
0
1
-1
-2
-3
u t 0 . 9 u t 1 t
Now the pattern of negative autocorrelation is very obvious.
25
Slide 27
AUTOCORRELATION
============================================================
Dependent Variable: LGHOUS
Method: Least Squares
Sample: 1959 2003
Included observations: 45
============================================================
Variable
Coefficient Std. Error t-Statistic Prob.
============================================================
C
0.005625
0.167903
0.033501
0.9734
LGDPI
1.031918
0.006649
155.1976
0.0000
LGPRHOUS
-0.483421
0.041780 -11.57056
0.0000
============================================================
R-squared
0.998583
Mean dependent var 6.359334
Adjusted R-squared
0.998515
S.D. dependent var 0.437527
S.E. of regression
0.016859
Akaike info criter-5.263574
Sum squared resid
0.011937
Schwarz criterion -5.143130
Log likelihood
121.4304
F-statistic
14797.05
Durbin-Watson stat
0.633113
Prob(F-statistic) 0.000000
============================================================
Next, we will look at a plot of the residuals of the logarithmic regression of expenditure on
housing services on income and relative price.
26
Slide 28
AUTOCORRELATION
0.04
0.03
0.02
0.01
0
1959
1963
1967
1971
1975
1979
1983
1987
1991
1995
1999
2003
-0.01
-0.02
-0.03
-0.04
This is the plot of the residuals of course, not the disturbance term. But if the disturbance
term is subject to autocorrelation, then the residuals will be subject to a similar pattern of
autocorrelation.
27
Slide 29
AUTOCORRELATION
0.04
0.03
0.02
0.01
0
1959
1963
1967
1971
1975
1979
1983
1987
1991
1995
1999
2003
-0.01
-0.02
-0.03
-0.04
You can see that there is strong evidence of positive autocorrelation. Comparing the graph
with the randomly generated patterns, one would say that is about 0.7 or 0.8.
28
Slide 30
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 12.1 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