Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Autocorrelation
1
What is in this Chapter?
• How do we detect this problem?
• What are the consequences?
• What are the solutions?
2
What is in this Chapter?
• Regarding the problem of detection, we start with the
Durbin-Watson (DW) statistic, and discuss its several
limitations and extensions.
– Durbin's h-test for models with lagged dependent variables
3
What is in this Chapter?
• The solutions to the problem of serial correlation are
discussed in:
– Section 6.3: estimation in levels versus first differences
4
6.1 Introduction
• The order of autocorrelation
5
6.2 Durbin-Watson Test
n
(ut ut 1 )
ˆ ˆ 2
d 2
n
t
ˆ
u
1
2
d
uˆ uˆ 2 uˆ uˆ
2
t
2
t 1 t t 1
uˆ 2
t
6
6.2 Durbin-Watson Test
• The sampling distribution of d depends on
values of the explanatory variables and hence
Durbin and Watson derived upper (dU ) limits
and lower (d L ) limits for the significance level for
d.
• There are tables to test the hypothesis of zero
autocorrelation against the hypothesis of first-
order positive autocorrelation. ( For negative
autocorrelation we interchange d L and dU .) 7
6.2 Durbin-Watson Test
• If d d L , we reject the null hypothesis of no
autocorrelation.
8
6.2 Durbin-Watson Test
Illustrative Example
• Consider the data in Table 3.11. The estimated
production function is
log X 3.938 1.451 log L1 0.384 log K1
( 0.237) ( 0.083) ( 0.048)
10
6.3 Estimation in Levels Versus
First Differences
• Simple solutions to the serial correlation problem: First
Difference
– First-difference
11
6.3 Estimation in Levels Versus
First Differences
yt xt ut
yt 1 xt 1 ut 1
( yt yt 1 ) ( xt xt 1 ) (ut ut 1 )
12
6.3 Estimation in Levels Versus
First Differences
yt t xt ut
yt 1 (t 1) xt 1 ut 1
( yt yt 1 ) ( xt xt 1 ) (ut ut 1 )
13
6.3 Estimation in Levels Versus
First Differences
• When comparing equations in levels and first
differences, one cannot compare the R2 because
the explained variables are different.
14
6.3 Estimation in Levels Versus
First Differences
• Let
1
R 2
R 2
from the first difference equation
RSS 0 residual sum of squares from the levels equation
RSS 1 residual sum of squares from the first difference
equation
RD2 comparable R 2 from the levels equation
1 R 2D n k 1
Then RSS 0 d RSS1
1 R 1
2
nk
RSS 0 n k 1
d
RSS1 n k 15
6.3 Estimation in Levels Versus
First Differences
Illustrative Examples
• Consider the simple Keynesian model discussed
by Friedman and Meiselman. The equation
estimated in levels is
Ct At t t 1 , 2 ,...., T
where Ct= personal consumption expenditure
(current dollars)
At= autonomous expenditure
(current dollars) 16
6.3 Estimation in Levels Versus
First Differences
• The model fitted for the 1929-1030 period gave
(figures in parentheses are standard)
1. Ct 58,335.0 2.4984 A t
( 0.312)
R 0.8771
1
2
DW 0.89 RSS1 11,943 10 4
2. Ct 1.993 A t
( 0.324)
17
6.3 Estimation in Levels Versus
First Differences
RSS 0 n k 1
R 1
2
d (1 R 2
1 )
RSS 1 n k
D
11.943 9
1 (0.89) (1 0.8096)
8.387 10
1 0.2172 0.7828
0.0434 36
R 1
2
D (0.858) (1 0.8405)
0.0278 37
1 0.2079 0.7921
20
6.3 Estimation in Levels Versus
First Differences
• Harvey gives a different definition of RD2 .He
defines it as
R
2
D
RSS 0
RSS1
1 R 12
• This does not adjust for the fact that the error
variances in the levels equations and the first
difference equation are not the same.
• The arguments for his suggestion are given in
his paper.
21
6.3 Estimation in Levels Versus
First Differences
• Usually, with time-series data, one gets high R2
values if the regressions are estimated with the
levels yt and Xt but one gets low R2 values if the
regressions are estimated in first differences (yt -
yt-1) and (xt - xt-1).
22
6.3 Estimation in Levels Versus
First Differences
• Since a high R2 is usually considered as proof of
a strong relationship between the variables
under investigation, there is a strong tendency to
estimate the equations in levels rather than in
first differences.
• An example
23
6.3 Estimation in Levels Versus
First Differences
• However, if the DW statistic is very low, it often
implies a misspecified equation, no matter what
the value of the R2 is
24
6.3 Estimation in Levels Versus
First Differences
• Granger and Newbold present some examples
with artificially generated data where y, x, and
the error u are each generated independently so
that there is no relationship between y and x.
• But the correlations between yt and yt-1,.Xt and
Xt-1, and ut and ut-1 are very high.
• Although there is no relationship between y and
x the regression of y on x gives a high R2 but a
low DW statistic.
25
6.3 Estimation in Levels Versus
First Differences
• When the regression is run in first differences, the R2 is
close to zero and the DW statistic is close to 2.
• Thus demonstrating that there is indeed no relationship
between y and x and that the R2 obtained earlier is
spurious.
• Thus regressions in first differences might often reveal
the true nature of the relationship between y and x.
• An example
26
Homework
• Find the data
– Y is the Taiwan stock index
– X is the U.S. stock index
• Run two equations
– The equation in levels (log-based price)
– The equation in the first differences
• A comparison between the two equations
– The beta estimate and its significance
– The R square
– The value of DW statistic
• Q: Adopt the equation in levels or the first
differences?
27
6.3 Estimation in Levels Versus
First Differences
• For instance, suppose that we have quarterly
data; then it is possible that the errors in any
quarter this year are most highly correlated with
the errors in the corresponding quarter last year
rather than the errors in the preceding quarter
• That is, ut could be uncorrelated with ut-1 but it
could be highly correlated with ut-4.
• If this is the case, the DW statistic will fail to
detect it. 28
6.3 Estimation in Levels Versus
First Differences
• What we should be using is a modified
statistic defined as
d4
(uˆ uˆ
t t 4 ) 2
uˆ 2
t
yt xt ut t 1, 2 ,......, T (6.2)
ut ut 1 et , et ~ (0, )
iid 2
e
30
6.4 Estimation Procedures with
Autocorrelated Errors
yt 1 xt 1 ut 1 (6.4)
yt yt 1 (1 ) ( xt xt 1 ) et (6.5)
31
6.4 Estimation Procedures with
Autocorrelated Errors
• In actual practice is not known
• There are two types of procedures for
estimating
– 1. Iterative procedures
– 2. Grid-search procedures.
32
6.4 Estimation Procedures with
Autocorrelated Errors
Iterative Procedures
33
6.4 Estimation Procedures with
Autocorrelated Errors
• Durbin suggested an alternative method of
estimating .
yt (1 ) yt 1 xt xt 1 et (6.7)
41
6.4 Estimation Procedures with
Autocorrelated Errors
• The estimates of the parameters (with standard
errors in parentheses) were as follows:
42
6.5 Effect of AR(1) Errors on OLS
Estimates
43
6.5 Effect of AR(1) Errors on OLS
Estimates
1. If is known, it is true that one can get estimators
better than OLS that take account of autocorrelation.
However, in practice is known and has to be
estimated. In small samples it is not necessarily true
that one gains (in terms of mean-square error for ˆ ) by
estimating .
This problem has been investigated by Rao and
Griliches, who suggest the rule of thumb (for sample of
size 20) that one can use the methods that take
account of autocorrelation if ˆ 0.3 ,where ̂ is the
estimated first-order serial correlation from an OLS
regression. In samples of larger sizes it would be
worthwhile using these methods for ̂ smaller than 0.3. 44
6.5 Effect of AR(1) Errors on OLS
Estimates
• 2. The discussion above assumes that the true errors
are first-order autoregressive. If they have a more
complicated structure (e.g., second-order
autoregressive), it might be thought that it would still be
better to proceed on the assumption that the errors are
first-order autoregressive rather than ignore the problem
completely and use the OLS method???
– Engle shows that this is not necessarily true (i.e.,
sometimes one can be worse off making the
assumption of first-order autocorrelation than ignoring
the problem completely).
45
6.5 Effect of AR(1) Errors on OLS
Estimates
3. In regressions with quarterly (or monthly) data,
one might find that the errors exhibit fourth (or
twelfth)-order autocorrelation because of not
making adequate allowance for seasonal
effects. In such case if one looks for only first-
order autocorrelation, one might not find any.
This does not mean that autocorrelation is not
a problem. In this case the appropriate
specification for the error term may be u t u t 4 et
for quarterly data and u t u t 12 et
monthly data.
46
6.5 Effect of AR(1) Errors on OLS
Estimates
4. Finally, and most important, it is often possible
to confuse misspecified dynamics with serial
correlation in the errors. For instance, a static
regression model with first-order autocorrelation
in the errors, that is, y t xt ut , ut ut 1 et ,can
written as
y t yt 1 xt xt 1 et (6.11)
47
6.5 Effect of AR(1) Errors on OLS
Estimates
4. The model is the same as
y t 1 yt 1 2 xt 3 xt 1 et (6.11' )
50
6.7 Tests for Serial Correlation in Models
with Lagged Dependent Variables
• In previous sections we considered explanatory
variables that were uncorrelated with the error term
• This will not be the case if we have lagged
dependent variables among the explanatory
variables and we have serially correlated errors
• There are several situations under which we would
be considering lagged dependent variables as
explanatory variables
• These could arise through expectations, adjustment
lags, and so on.
• Let us consider a simple model
51
6.7 Tests for Serial Correlation in Models
with Lagged Dependent Variables
• Let us consider a simple model
An example
53
6.7 Tests for Serial Correlation in Models
with Lagged Dependent Variables
Durbin’s h-Test
• Since the DW test is not applicable in these
models, Durbin suggests an alternative test,
called the h-test.
• This test uses
n
h ˆ
1 n Vˆ (ˆ )
as a standard normal variable.
54
6.7 Tests for Serial Correlation in Models
with Lagged Dependent Variables
55
6.7 Tests for Serial Correlation in Models
with Lagged Dependent Variables
Durbin’s Alternative Test
• From the OLS estimation of equation(6.12)
compute the residuals ût .
• Then regress uˆt on uˆt 1 , yt 1 , and xt
• The test for ρ=0 is carried out by testing the
significance of the coefficient of uˆin
t 1 the
latter regression.
56
6.7 Tests for Serial Correlation in Models
with Lagged Dependent Variables
• An equation of demand for food estimated from 50
observations gave the following results (figures in
parentheses are standard errors):
60
6.9 Strategies When the DW Test
Statistic is Significant
• 1. Test whether serial correlation is due to
omitted variables.
61
6.9 Strategies When the DW Test
Statistic is Significant
62
6.9 Strategies When the DW Test
Statistic is Significant
• Then since vt 2 xt2 ut , if xt is
autocorrelated, this will produce
autocorrelation in vt.
• However vt is no longer independent of xt.
• This not only are the OLS estimators of β0
and β1 from (6.20) inefficient, they are
inconsistent as well.
63
6.9 Strategies When the DW Test
Statistic is Significant
• Serial correlation due to misspecification dynamics.
• In a seminal paper published in 1964, Sargan pointed
out that a significant DW statistic does not necessarily
imply that we have a serial correlation problem.
• This point was also emphasized by Henry and Mizon.
• The argument goes as follows.
• Consider
yt xt ut with ut ut 1 et (6.24)
and et are independent with a common variable σ2.
• We can write this model as
yt yt 1 xt xt 1 et (6.25) 64
6.9 Strategies When the DW Test
Statistic is Significant
• Consider an alternative stable dynamic model:
65
6.9 Strategies When the DW Test
Statistic is Significant
• A test for ρ=0 is a test for β1=0 (and β3=0).
• But before we test this, what Sargan says is that
we should first test the restriction (6.27) and test
for ρ=0 only if the hypothesis H 0 : 12 3 0 is
not rejected.
• If this hypothesis is rejected, we do not have a
serial correlation model and the serial correlation
in the errors in (6.24) is due to “misspecified”
dynamics, that is the omission of the variable yt-1
and xt-1 from the equation. 66
6.9 Strategies When the DW Test
Statistic is Significant
• If the DW test statistic is significant, a proper
approach is to test the restriction(6.27) to make sure
that what we have is a serial correlation model
before we undertake any autoregressive
transformation of the variables.
• In fact, Sargan suggests starting with the general
model (6.26) and testing the restriction (6.27) first,
before attempting any test for serial correlation.
67
6.9 Strategies When the DW Test
Statistic is Significant
Illustrative Example
• Consider the data in Table 3.11 and the estimation
of the production function (4.24).
• In Section 6.4 we presented estimates of the
equation assuming that the errors are AR(1).
• This was based on a DW test statistic of 0.86.
• Suppose that we estimate an equation of the
form(6.26).
• The results are as follows (all variables in logs;
figures in parentheses are standard errors):
68
6.9 Strategies When the DW Test
Statistic is Significant
Illustrative Example