chapter 9 correlated errors...auxiliary regression of residuals on lag test statistic: critical...

26
Chapter 9 Correlated Errors

Upload: others

Post on 17-Sep-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

Chapter 9Correlated Errors

Page 2: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

Learning Objectives• Demonstrate the problem of correlated errors and its

implications

• Conduct and interpret tests for correlated errors

• Correct for correlated errors using Newey and West’s estimator (ex post) or using generalized least squares (ex ante)

• Correct for correlated errors by adding lagged variables to the model

• Show that correlated errors can arise in clustered and spatial data as well as in time-series data

Page 3: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

Autocorrelated Errors

-20

-10

0

10

20

30

40

50

1960 1965 1970 1975 1980 1985 1990 1995 2000 2005 2010 2015

Coca Cola Stock Price

Page 4: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

Logs Make the Model Fit Better

-5

-4

-3

-2

-1

0

1

2

3

4

5

1960 1965 1970 1975 1980 1985 1990 1995 2000 2005 2010 2015

Log of Coca Cola Stock Price

Page 5: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

Autocorrelated Errors

-1.5

-1

-0.5

0

0.5

1

1.5

2

1960 1965 1970 1975 1980 1985 1990 1995 2000 2005 2010 2015

Log of Coca Cola Stock Price: Deviations from Trend

Page 6: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

The Problem in Words• You think you have more information in your data

than you really do.• It can be the opposite – you think you have less info than you really do, but this is

rare

• OLS estimates unbiased, but not BLUE

• Causes standard errors to be underestimated

• Examples1. Stock prices over time2. Consumption over time3. Income across space

Page 7: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

The Problem Mathematically

• If ρ > 0, then some of last period’s error remains in this period’s error – we have less new information each period than the standard error formula assumes.

• If ρ < 0, then we have more information than the s.e. formula assumes – this is rare!

0 1 1 2 2

1

β β β εε ρε −

= + + += +

t t t t

t t t

Y X Xu

Page 8: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

Solutions

1. Test and fix after-the-fact (ex-post)

2. Change the model to eliminate the correlated errors

i. Generalized least squares (ex-ante correction)ii. Change the model by adding lagged variables (best

approach)

Page 9: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

Testing for AutocorrelationAutocorrelation Model

Breusch-Godfrey test1. Estimate regression

2. Auxiliary regression of residuals on lag

0 1 1 2 2

1

β β β εε ρε −

= + + += +

t t t t

t t t

Y X Xu

1 0 1 1 2 2ρ α α α−= + + + +t t t t te e X X u

0 1 1 2 2= + + +t t t tY b b X b X e

Page 10: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

Breusch-Godfrey TestAuxiliary regression of residuals on lag

Test statistic:Critical value: (e.g., at 5% significance, c.v. = 3.84)

Can add more lags to auxiliary regression

critical value:

1 0 1 1 2 2ρ α α α−= + + + +t t t t te e X X u

2( 1)= −BG T R2(1)χ

1 1 2 2 0 1 1 2 2...ρ ρ ρ α α α− − −= + + + + + + +t t t m t m t t te e e e X X u2( )= −BG T m R 2

( )χ m

Page 11: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

Example: US Consumption vs Income

0

2000

4000

6000

8000

10000

12000

1947 1957 1967 1977 1987 1997 2007

$ pe

r qu

arte

r

YearReal personal consumption expenditures per capitaReal disposable personal income per capita

Page 12: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

Taking Logs Straightens the Trend

7

7.5

8

8.5

9

9.5

1947 1957 1967 1977 1987 1997 2007

natu

ral l

og o

f $ p

er q

uart

er

Year

Log real personal consumption expenditures per capitaLog real disposable personal income per capita

Page 13: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

Regression Residuals

-0.08

-0.06

-0.04

-0.02

0

0.02

0.04

0.06

0.08

0.1

1947 1957 1967 1977 1987 1997 2007

Year

ln( ) 0.38 1.03ln( )= + −t t te cons income

There appears to be strong autocorrelation

Page 14: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

Breusch-Godfrey Test

VariableEstimated Coefficient

Standard Error

t-statistic

e(t-1) 0.885 0.027 32.70Ln(Income) 0.001 0.001 0.56

Constant -0.007 0.012 -0.58

Sample Size 274

R-squared 0.80

(T-1)*R-squared 217.80

Critical χ2(1) 1 df, 5% 3.84

We reject the null hypothesis at the 5% level – we have autocorrelation

Page 15: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

Newey-West Correction for Standard Errors

If CR2 and CR3 Hold:

If CR2 fails (White’s Method)

If CR2 and CR3 fail (Newey-West)

2 21

1[ ]

=

=∑N

ii

V b w s

2 21

1[ ]

=

=∑N

i ii

V b w e

2 21

1 1[ ] 1 2 1

= =

= + −

∑ ∑T L

t t jt j

jV b w e rL

Page 16: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

Changing the Model: GLSAutocorrelation Model

The error ut satisfies CR2 and CR3

We have a new model

0 1

1

β β εε ρε −

= + += +

t t t

t t t

Y Xu

( )0 1 1

0 1 1 0 1 1

β β ρεβ β ρ β β

− −

= + + +

= + + − − +t t t t

t t t t

Y X uX Y X u

* * *0 1β β= + +t t tY X u

( )1 0 1 1(1 )ρ β ρ β ρ− −− = − + − +t t t t tY Y X X u

Page 17: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

Changing the Model: GLSWe have a new model

where and

• But we don’t know ρ. Solution: “Feasible GLS”

1. OLS regression

2. Error autocorrelation

3. Transform variables

4. OLS regression

* * *0 1β β= + +t t tY X u

*1ρ −= −t t tY Y Y *

1ρ −= −t t tX X X

0 1= + +t t tY b b X e2

1 12 2

− −= =

=∑ ∑T T

t t tt t

r e e e

* *1 1,− −= − = −t t t t t tY Y rY X X rX

* *0 1= + +GLS GLS GLS

t t tY b b X e

Page 18: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

OLS with Newey-West vs FGLS

Variable

OLS (Newey West std. error with L=40)

FGLS

Estimated Coefficient

Standard Error

Estimated Coefficient

Standard Error

Income 1.030 0.015 1.012 0.013Constant -0.379 0.132 -0.026 0.012

Sample Size 275 274r 0.88

Page 19: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

Changing the Model: Distributed LagsAutocorrelation Model

The error ut satisfies CR2 and CR3

We have a new model

0 1

1

β β εε ρε −

= + += +

t t t

t t t

Y Xu

( )0 1 1

0 1 1 0 1 1

0 1 1 1 1(1 )

β β ρεβ β ρ β ββ ρ ρ β ρβ

− −

− −

= + + +

= + + − − +

= − + + − +

t t t t

t t t t

t t t t

Y X uX Y X u

Y X X u

* * * *0 1 1 2 3 1β β β β− −= + + + +t t t t tY Y X X u

Page 20: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

Distributed Lag Model

Interpreting the Model: Two Tricks

1. Drop the time subscripts to get “long-run”

* * * *0 1 1 2 3 1β β β β− −= + + + +t t t t tY Y X X u

* * * *0 1 2 3

* * *0 2 3

1 11 * 1 *

β β β β

β β ββ β

= + + +

+= +

− −

Y Y X X

Y X

Page 21: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

Distributed Lag Model

Interpreting the Model: Two Tricks1. Drop the time subscripts to get “long-run”

2. Derive the “error correction model”

* * * *0 1 1 2 3 1β β β β− −= + + + +t t t t tY Y X X u

( )

* * * * * *1 0 1 1 2 3 1 1 3 3

* * ** *0 2 31 1 3 1* *

1 1

(1 )1 1

β β β β β β

β β ββ ββ β

− − − −

− −

− = + + + + − + −

+= − − − − − − + − −

t t t t t t t t t

t t t t t

Y Y Y X X u Y X X

Y X X X u

* * *0 2 3

1 11 * 1 *β β ββ β

+= +

− −Y X

Page 22: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

Distributed Lag Estimates

VariableEstimated Coefficient

Standard Error

t-statistic

Consumption(t-1) 0.927 0.020 47.20Income 0.297 0.046 6.44

Income(t-1) -0.222 0.048 -4.66Constant -0.021 0.012 -1.75

Sample Size 274R-squared 0.9997

Page 23: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

Distributed Lag Model

Interpreting the Model: Two Tricks

1. Drop the time subscripts to get “long-run”

2. Derive the “error correction model”( ) ( )1 1 10.073 0.29 1.03 0.222− − −− = − + − + − +t t t t t t tY Y Y X X X u

0.29 1.03= − +Y X

1 10.021 0.927 0.297 0.222− −= − + + − +t t t t tY Y X X u

Page 24: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

Correlated Errors Across Space• Famous study by Brent Moulton in 1990• Data: (i) Wages for 18,946 workers in the US

(ii) 14 garbage variables• Moulton regressed wages on the 14 garbage

variables plus education and work experience– 6 of the 14 garbage variables were significant

• WHY? Spatial correlation in errors made standard errors 3-5 times too small

Page 25: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

“Clustering” Standard Errors

Correlation over time: Newey-West

Correlation over space: Clustering

2 21

1 1[ ] 1 2 1

= =

= + −

∑ ∑T L

t t jt j

jV b w e rL

11 1

[ ] 1( , in same cluster)= =

=∑∑N N

i i j ji j

V b i j w e w e

Page 26: Chapter 9 Correlated Errors...Auxiliary regression of residuals on lag Test statistic: Critical value: (e.g., at 5% significance, c.v. = 3.84) Can add more lags to auxiliary regression

What We Learned

• Correlated errors cause OLS to lose its “best” property and the estimated standard errors to be biased.

• Same as heteroskedasticity

• As long as the autocorrelation is not too strong, the standard error bias can be corrected with Newey and West’s heteroskedasticity and autocorrelation consistent estimator.

• Getting the model right by adding lagged variables to the model is usually the best approach to deal with autocorrelation in time-series data.