Transcript Chapter 6

Chapter 6

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 – Tests for higher-order serial correlation. • We discuss (in Section 6.5) the consequences of serially correlated errors and OLS estimators.

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 – Section 6.9: strategies when the DW test statistic is significant – Section 6.10: trends and random walks • This chapter is very important and the several ideas have to be understood thoroughly.

4

6.1 Introduction

• The order of autocorrelation • In the following sections we discuss how to: 1. Test for the presence of serial correlation.

2. Estimate the regression equation when the errors are serially correlated.

5

6.2 Durbin-Watson Test

d

n

 2 (

u

ˆ

t

u

ˆ

t

 1 ) 2

n

 1

u

ˆ

t

2

d

 

u

ˆ

t

2  

u

ˆ

t

2  1 

u

ˆ

t

2  2 

u

ˆ

t u

ˆ

t

 1 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 limits

U d

.

• There are tables to test the hypothesis of zero autocorrelation against the hypothesis of first order positive autocorrelation. ( For negative

d

and

d

7

6.2 Durbin-Watson Test

d

d L

autocorrelation.

d

d U d L

d

d U

8

6.2 Durbin-Watson Test

Illustrative Example

• Consider the data in Table 3.11. The estimated production function is log

R

2

X

  ( 3 .

938 0 .

237 )  1 ( .

451 0 .

083 ) log

L

1  0 ( 0 .

384 .

048 ) log

K

1  0 .

9946 DW  0 .

88  0 .

559 • Referring to the DW table with

k

’=2 and

n

=39 for

d L

 1 .

38  

d

 0 .

858 

d L

9

6.2 Limitations of D-W Test

1. It test for only first-order serial correlation.

2. The test is inconclusive if the computed value

d L

and

d U

3. The test cannot be applied in models with lagged dependent variables.

10

6.3 Estimation in Levels Versus First Differences • Simple solutions to the serial correlation problem: First Difference • If the DW test rejects the hypothesis of zero serial correlation, what is the next step? • In such cases one estimates a regression by transforming all the variables by –

ρ differencing (quasi-first difference)

First-difference

11

6.3 Estimation in Levels Versus First Differences

y t

   

x t

u t y t

 1    

x t

 1 

u t

 1 (

y t

y t

 1 )   (

x t

x t

 1 )  (

u t

u t

 1 ) 12

6.3 Estimation in Levels Versus First Differences

y t

   

t

 

x t

u t y t

 1     (

t

 1 )  

x t

 1 

u t

 1 (

y t

y t

 1 )     (

x t

x t

 1 )  (

u t

u t

 1 ) 13

6.3 Estimation in Levels Versus First Differences • When comparing equations in levels and first differences, one cannot compare the

R 2

because the explained variables are different. • One can compare the residual sum of squares but only after making a rough adjustment. (Please refer to P.231) 14

6.3 Estimation in Levels Versus First Differences • Let 

R

1 2  

R

2 from the first difference equation

RSS

residual sum of squares from the levels equation 0 

RSS

1 residual sum of squares from the first difference equation 

R D

2

R

1 

R

Then 1

R

2

D

2 1     

RSS

0 

n

n k

k

 1 

d

  

RSS RSS

0 1   

n

n k

k

 1 

d

  

RSS

1 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

C t

   

A t

 

t t

 1 , 2 ,....,

T

where C t = personal consumption expenditure (current dollars) A t = 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 .

C t

 58 , 335 .

0  2 ( .

4984 0 .

312 )

A t

2 .

R

1 2 

C t

  0 .

8771 1 .

993  ( 0 .

324 )

A t DW

 0 .

89

R

0 2  0 .

8096

DW

 1 .

51

RSS

1  11 , 943  10 4

RSS

0  8 , 387  10 4 17

6.3 Estimation in Levels Versus First Differences 2

R D

 1 

RSS

0

RSS

1

n

k n

 

k

1

d

( 1 

R

1 2 )  1  11 .

943 8 .

387  1  0 .

2172 9 ( 0 .

89 ) ( 1  0 .

8096 )  10 0 .

7828 equation in first differences.

18

6.3 Estimation in Levels Versus First Differences • For the production function data in Table 3.11 the first difference equation is 

R

1 2 log  0

X

.

 0 ( .

987 0 .

158 )  log

L

1  0 ( .

502 0 .

134 )  log

K

1 8405

DW

 1 .

177

RSS

1  0 .

0278 • The comparable figures the levels equation reported earlier in Chapter 4, equation (4.24) are

R

0 2  0 .

9946

DW

 0 .

858

RSS

0  0 .

0434 19

6.3 Estimation in Levels Versus First Differences 2

R D

 1  0 .

0434  36  1  0 .

0 .

0278 2079    37 0 .

7921 ( 0 .

858 ) ( 1  0 .

8405 ) equation in first differences.

20

6.3 Estimation in Levels Versus First Differences • Harvey gives a different definition of .He

D

defines it as

R

2

D

RSS

0

RSS

1  1 

R

2 1  • 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 R 2 values if the regressions are estimated with the levels y t and X t but one gets low R 2 values if the regressions are estimated in first differences (y t y t-1 ) and (x t - x t-1 ).

22

6.3 Estimation in Levels Versus First Differences • Since a high R 2 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. • This is sometimes called the “R 2 syndrome." • 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 R 2 is • In such cases one should estimate the regression equation in first differences and if the R 2 is low, this merely indicates that the variables y and x are not related to each other. 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 y t X t-1 , and u t and u t-1 and y are very high. t-1 ,.X

t and • Although there is no relationship between y and x the regression of y on x gives a high R 2 but a low DW statistic.

25

6.3 Estimation in Levels Versus First Differences • When the regression is run in first differences, the R 2 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 R 2 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, u t could be uncorrelated with u t-1 but it could be highly correlated with u t-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

d

4   (

u

ˆ

t

 

u

ˆ

t

2

u

ˆ

t

 4 ) 2 • The quarterly data (e.g. GDP) • The monthly data (e.g. Industrial product index) 29

6.4 Estimation Procedures with Autocorrelated Errors • GLS (Generalized least squares)

y t u t

   

x t

 

u t

 1 

e t

u t

,

t

 1 , 2 ,......,

T e t

iid ~ ( 0 , 

e

2 ) ( 6 .

2 ) 30

6.4 Estimation Procedures with Autocorrelated Errors 

y t y t

  1   

y t

 1      ( 1   

x t

 1 )     (

u t

 1

x t

 

x t

 1 ) 

e t y t

*

x t

* 

y t

x t

   

y t

 1

x t

 1

t

 2 , 3 ,....,

T

( 6 .

4 ) ( 6 .

5 ) ( 6 .

6 ) 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 • Among the iterative procedures, the earliest was the Cochrane-Orcutt (C-O) procedure.

• In the Cochrane-Otcutt procedure we estimate equation(6.2) by OLS, get the estimated

u

ˆ  by  ˆ  uˆ t uˆ t 1 / 

u

ˆ

t

2 33

6.4 Estimation Procedures with Autocorrelated Errors • Durbin suggested an alternative method of  • In this procedure, we write equation (6.5) as

y t

  ( 1   )  

y t

 1  

x t

  

x t

 1 

e t

( 6 .

7 )

y on y

,

x y

, and

x

 34

6.4 Estimation Procedures with Autocorrelated Errors • Use equation (6.6) and (6.6’) and estimate a regression of y * on x * . • The only thing to note is that the slop coefficient • Thus after estimating the regression of y * on x * , we have to adjust the constant term appropriately to get estimates of the parameters of the original equation (6.2).

35

6.4 Estimation Procedures with Autocorrelated Errors • Further, the standard errors we compute from the regression of y * on x * are now ”asymptotic” been estimated.

• If there are lagged values of y as explanatory variables, these standard errors are not correct even asymptotically.

• The adjustment needed in this case is discussed in Section 6.7.

36

6.4 Estimation Procedures with Autocorrelated Errors

Grid-Search Procedures

• One of the first grid-search procedures is the Hildreth and Lu procedure suggested in 1960.

y t

and

x t

* 

y t

o

n x t

the residual sum of squares RSS in each case.

37

6.4 Estimation Procedures with Autocorrelated Errors minimum.

• Again repeat this procedure for smaller intervals  minimum is -0.4, repeat this search procedure   38

6.4 Estimation Procedures with Autocorrelated Errors • This procedure is not the same as the ML procedure. If the errors e t are normally distributed, we can write the log-likelihood function as (derivation is omitted) log where

L

 const .

T

2

Q

  

y t

log 

e

2  

y t

 1  1 2 log ( 1   2 ) 

Q

2   ( 1   )   (

x t

  ( 6 .

8 )

x t

 1 )  2 • Thus minimizing Q is not the same as maximizing log L. • We can use the grid-search procedure to get the ML estimate.

39

6.4 Estimation Procedures with Autocorrelated Errors • Consider the data in Table 3.11 and the estimation of the production function log

X

    1 log

L

1   2 log

K

1 

u

• The OLS estimation gave a DW statistic of 0.86, suggesting significant positive autocorrelation.

• Assuming that the errors were AR(1), two estimation procedures were used: the Hildreth Lu grid search and the iterative Cochrane-Orcutt (C-O). 40

6.4 Estimation Procedures with Autocorrelated Errors • The iterative C-O procedure • The DW test statistic implied 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.

better than OLS that take account of autocorrelation.  estimated. In small samples it is not necessarily true  ˆ  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   ˆ estimated first-order serial correlation from an OLS regression. In samples of larger sizes it would be  ˆ

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

u t

 

u t

 4 

e t

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

y t

 

x t

u t

,

u t

 

u t

 1 

e t

written as

y t

 

y t

 1  

x t

  

x t

 1 

e t

( 6 .

11 ) 47

6.5 Effect of AR(1) Errors on OLS Estimates 4. The model is the same as

y t

  1

y t

 1   2

x t

  3

x t

 1 

e t

( 6 .

11 ' ) We can estimate the model (6.11’) and test this restriction. If it is rejected, clearly it is not valid to estimate (6.11).(the test procedure is described in Section 6.8.) 48

6.5 Effect of AR(1) Errors on OLS Estimates • The errors would be serially correlated but not because the errors follow a first-order autoregressive process but because the term x t-1 and y t-1 have been omitted.

• Thus is what is meant by “misspecified dynamics.” Thus significant serial correlation in the estimated residuals does not necessarily imply that we should estimate a serial correlation model. 49

6.5 Effect of AR(1) Errors on OLS Estimates • Some further tests are necessary (like the  1  2   3  mentioned case).

• In fact, it is always best to start with an equation like (6.11’) and test this restriction before applying any test for serial correlation.

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 • e t are independent with mean 0 and variance σ 2     • Because u t depends on u t-1 u t-1 , the two variables y t-1 and y and u t t-1 depends on will be correlated.

52

6.7 Tests for Serial Correlation in Models with Lagged Dependent Variables 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

h

  ˆ 1 

n n V

ˆ (  ˆ ) as a standard normal variable.

54

6.7 Tests for Serial Correlation in Models with Lagged Dependent Variables • Hence  ˆ is the estimated first-order serial estimated variance of the OLS estimate of α , and n is the sample size.

case Durbin suggests the following test.

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)

u

ˆ

t u

ˆ on

u

ˆ ,

y

, and

x t

• The test for ρ=0 is carried out by testing the significance of the coefficient of in the

t

1 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): where q t =food consumption per capita p t =food price (retail price deflated by the consumer price index) y t =per capita disposable income deflated by the consumer price index 57

6.7 Tests for Serial Correlation in Models with Lagged Dependent Variables • We have • Hence Duribin’s h-statistic is • This is significant at the1%level.

• Thus we reject the hypothesis ρ=0, even though the  ˆ the OLS residuals is 58

6.7 Tests for Serial Correlation in Models with Lagged Dependent Variables • Let us keep all the numbers the same and just  ˆ • The following are the results: • Thus, other things equal, the precision with  ˆ significant effect on the outcome of the h-test.

59

6.9 Strategies When the DW Test Statistic is Significant • The DW test is designed as a test for the hypothesis ρ = 0 if the errors follow a first-order autoregressive process • However, the test has been found to be robust against other alternatives such as AR(2), MA(1), ARMA(1, 1), and so on.

• Further, and more disturbingly, it catches specification errors like omitted variables that are themselves autocorrelated, and misspecified dynamics (a term that we will explain). • Thus the strategy to adopt, if the DW test statistic is significant, is not clear. • We discuss two different strategies: 60

6.9 Strategies When the DW Test Statistic is Significant • 1. Test whether serial correlation is due to omitted variables.

• 2. Test whether serial correlation is due to misspecified dynamics.

61

6.9 Strategies When the DW Test Statistic is Significant

Autocorrelation Caused by Omitted Variables

• Suppose that the true regression equation is

y t

  0   1

x t

  2

x t

2 

u t

and instead we estimate

y t

  0   1

x t

v t

( 6 .

20 ) 62

6.9 Strategies When the DW Test Statistic is Significant  t autocorrelated, this will produce is autocorrelation in v t . • However v t is no longer independent of x t .

• 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

y t

 

x t

u t with u t

 

u t

 1 

e t

( 6 .

24 ) and et are independent with a common variable σ2.

• We can write this model as

y t

 

y t

 1  

x t

 

x t

 1 

e t

( 6 .

25 ) 64

6.9 Strategies When the DW Test Statistic is Significant • Consider an alternative stable dynamic model: • Equation (6.25) is the same as equation(6.26) with the restriction 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

H

0  1  2   3  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 y t-1 and x t-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

• Under the assumption that the errors are AR(1), the residual sum of squares, obtained from the Hildreth-Lu procedure we used in Section 6.4, is RSS 1 =0.02635

69

6.9 Strategies When the DW Test Statistic is Significant • Since we have two slope coefficients, we have two restrictions of the form (6.27).

• Note that for the general dynamic model we estimating six parameters (α and five β’s).

• For the serial correlation model we are estimating four parameters (α, two β’s, and ρ ).

• We will use the likelihood ratio test (LR) 70

6.9 Strategies When the DW Test Statistic is Significant   (

RSS

0

RSS

1 )

n

/ 2 and -2log e λhas a χ 2 -distribution with d.f. 2(number of restrictions).

• In our example which is significant at the 1% level.

• Thus the hypothesis if a first-order autocorrelation is rejected.

• Although the DW statistic is significant, this does not mean that the errors are AR(1).

71