Yt ttx T xβ 1 tt t

52
ECON207 Session 6 Slide 1 Regressions on Time Series Data 1 { , } T t t t Y = x t t t Y ε = + x β What are the issues? Generally, cannot consider data to be independent draws Intertemporal correlations / Serial Correlations / Autocorrelations

Transcript of Yt ttx T xβ 1 tt t

Page 1: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 1

Regressions on Time Series Data

1{ , }Tt t tY =x t t tY ε′= +x β

What are the issues?

Generally, cannot consider data to be independent draws

Intertemporal correlations / Serial Correlations / Autocorrelations

Page 2: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 2

Or even identical:

Singapore IP Index

Other issues: changing variances, seasonalities

25

50

75

100

125

1990 2000 2010T

IP_S

G

Page 3: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 3

Presence of serial correlation, must use appropriate formulas:

E.g. 1{ }Tt tY = , [ ]tE Y µ= , 2var[ ]tY σ= , but not serially uncorrelated

Want to estimate µ .

1 1

1 1[ ] [ ]T T

t tt t

E Y E Y E YT T

µ= =

= = =

∑ ∑

21

1 2 121 2 3

2

1 2 122 3

1var var

1 var[ ] 2 cov[ , ] 2 cov[ , ] 2cov[ , ]

1 2 cov[ , ] 2 cov[ , ] 2cov[ , ]

T

tt

T T T

t t t t t Tt t t

T T

t t t t Tt t

Y YT

Y Y Y Y Y Y YT

Y Y Y Y Y YT Tσ

=

− −= = =

− −= =

=

= + + + +

= + + + +

∑ ∑ ∑

∑ ∑

Not 2

var[ ]YTσ

= .

Page 4: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 4

Spurious Regressions:

E.g. SG_IP on simulated (fake) tY where 0 1t t tY Yδ ε−= + + , 0 0.5δ = , ~ (0,1)t Nε

1000 times (same SG_IP, different tY )

Histogram of t-statistics and R-squares

Page 5: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 5

Dynamic Specifications

0 1t t tY Xβ β ε= + + “Static Model” may be too restrictive?

0 1 2 1 1t t t p t p tY X X Xβ β β β ε− + −= + + + + + “Distributed Lag model”

- for dynamic causal parameters?

- Parameter interpretation?

0 1 1 2 3 1 2...t t t t P t p tY Y X X Xβ β β β β ε− − + −= + + + + + + “Autoregressive DL”

- Interpretation?

0 1 1 2 1t t t tY Y Xβ β β ε− −= + + + For forecasting?

Page 6: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 6

Structural Change

E.g. 0 1

0 1

for for

t tt

t t

X tY

X tβ β ε τδ δ ε τ

+ + ≤= + + >

- How to detect?

- How to accommodate?

Certain OLS assumptions too strong?

1[ | ,..., ] 0i NE ε =x x for all i Required for unbiasedness

In Time Series data

1[ | ,..., ] 0t TE ε =x x for all t “Strong exogeneity”

Too strong!

Page 7: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 7

E.g. tε may contain information that can predict future 1 2,t tX X+ +

E.g. tX may be decision variable influenced by 1 2, ,...t tε ε− −

E.g. Regression may contain lagged dependent variable 0 1 1t t tY Yβ β ε−= + + “Autoregression of Order 1”

Page 8: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 8

More reasonable:

[ | ] 0t tE ε =x “contemporaneous exogeneity”

But then OLS not unbiased

Consistent? Sometimes…

Properties of OLS estimators, and remedies, depends on ‘nature’ of time series

Study OLS estimators for different classes of time series

Key statistic: autocovariance / autocorrelation

Page 9: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 9

Autocovariances and Autocorrelations

Autocovariance at lag k:

, cov[ , ] [( [ ])( [ ])]k t t t k t t t k t kY Y E Y E Y Y E Yγ − − −= = − − , 1,2,3,...k =

Autocovariance at lag 0 is the variance

0, cov[ , ] [( [ ])( [ ])] var[ ]t t t t t t t tY Y E Y E Y Y E Y Yγ = = − − =

Will generally change with k, possibly also with t

Important special case is when ,k t kγ γ=

1

2

3

4

5

6

1 2 3 4 5 6Y_1

Y

1

2

3

4

5

6

1 2 3 4 5 6Ya_1

Ya

1

2

3

4

5

6

1 2 3 4 5 6Yb_1

Yb

1

2

3

4

5

6

1 2 3 4 5 6Yc_1

Yc

Page 10: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 10

Sometimes prefer to work with autocorrelations:

0

cov[ , ] cov[ , ]var[ ]var var

t t k t t k kk

tt t k

Y Y Y YYY Y

γργ

− −

= = =

(we assume here variance and correlations don’t change over time.)

Measuring autocovariances and autocorrelations

Sample Autocov 1

1ˆ ( )( )T

k t t kt k

Y Y Y YT

γ −= +

= − −∑ where 11 T

ttY YT =

= ∑

Sample Autocorr 0

ˆˆˆk

kγργ

=

0,1,2,3,...k =

1ˆ{ }k kγ ∞= sample autocovariance function

0ˆ{ }k kρ ∞= sample autocorrelation function (correllogram)

Page 11: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 11

-1.0

-0.5

0.0

0.5

1.0

4 8 12 16 20 24 28Lag

ACF

Series: Y

25

50

75

100

125

1990 2000 2010T

IP_S

G

-1.0

-0.5

0.0

0.5

1.0

0 5 10 15 20 25 30Lag

ACF

Series: IP_SG

Page 12: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 12

1

1

_ __ __

t tt

t

IP SG IP SGIP SG GIP SG

−=

-0.2

0.0

0.2

0.4

1990 2000 2010Time

IP_S

G_G

-0.2

0.0

0.2

0.4

Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov DecMonth

year1983

1984

1985

1986

1987

1988

1989

1990

1991

1992

1993

1994

1995

1996

1997

1998

1999

2000

2001

2002

2003

2004

2005

2006

2007

2008

2009

2010

2011

2012

2013

2014

2015

2016

2017

Seasonal plot: IP_SG_G

-1.0

-0.5

0.0

0.5

1.0

12 24Lag

ACF

Series: IP_SG_G

Page 13: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 13

Important Classes of Time Series

tY covariance stationary if for all t

- [ ]tE Y µ= < ∞

- cov[ , ]t t k kY Y γ− = < ∞ , 0,1,2,...k =

Remarks: Main point is – does not change with t (is constant)

Finiteness important as well

Autocovariance requirement includes variance

Autocovariance may change with k (but does not have to)

Alt names: weak stationarity, second-order stationarity,…

Page 14: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 14

tY strictly stationary if

Joint pdf of any collection of data points depends only on relative spacing

e.g.,

2 1 3 7 7 10 12 16 3 5 9( , , , ) ( , , , ) ( , , , )t t t tf Y Y Y Y f Y Y Y Y f Y Y Y Y− + + += = for all t

1 10 5 14 9( , ) ( , ) ( , )t tf Y Y f Y Y f Y Y += = for all t

1 2( ) ( ) ( )t t tf Y f Y f Y+ += = etc.

If mean, variance, autocovariances are finite, then strict stationarity implies

covariance stationarity

E.g. A white noise process (zero-mean, constant variance, serially uncorrelated) is

covariance stationary

E.g. An independent white noise process (a white noise process that is iid) is

strictly stationary

Page 15: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 15

E.g. Stationary Autoregressive Processes

20 1 1 , ~ (0, )

iid

t t t tY Yβ β ε ε σ−= + + ? “AR(1)”

Page 16: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 16

Some remarks about AR(1)

- Pure stats model with no ‘economics’ underlying it?

- Yes and no…

E.g.

0 1 2 1

0 1

(supply equation)

(demand equation)

(market clearing)

s st t t td dt t td st t

Q P P

Q P

Q Q

α α α ε

δ δ ε−= + + +

= + +

=

Equating dd and ss and solving for tP

0 0 21

1 1 1 1 1 1

s dt t

t tP Pα δ ε εαδ α δ α δ α−

− −= + +

− − −

Page 17: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 17

An AR(1) can be cov-stationary

- Requires 1| | 1β ≤

0 1 1t t tY Yβ β ε−= + + , 1| | 1β < , 2~ (0, )iid

tε σ , ...,1,2,..., ,...t T=

- Assume 0β , 1β , 2σ not changing over time

We derive properties to show cov-stationary

Write

0

1

0 1 12

0 1 0 1 2 1 0 1 0 1 2 1 1

2 2 10 1 1 1 1 1 1 2 1 1 1

assume 0 as 1

201 1 1 2 1

1

( )...

(1 )

1

t t t

t t t t t t

k k kt t t t k t k

k

kt t t

Y Y

Y Y

Yββ

β β ε

β β β β ε ε β β β β ε β ε

β β β β ε β ε β ε β ε β

β ε β ε β ε ββ

− − − −

+− − − − −

→→ →∞

− −

= + +

= + + + + = + + + +

=

= + + + + + + + + + +

= + + + + +−

t kε − +

Page 18: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 18

Then

(a) 20 01 1 1 2

1 1

[ ] [ ] [ ] [ ]1 1t t t tE Y E E Eβ βε β ε β ε

β β− −= + + + + =− −

for all t

(b) 2

2 41 1 1 2 2

1

var[ ] var[ ] var[ ] var[ ]1t t t tY σε β ε β ε

β− −= + + + =−

for all t

(a) means tY fluctuates around a constant

(b) mean size of fluctuations constant

Possibly constant variance Not constant variance

Page 19: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 19

Autocovariance function 2 2

1 1 1 2 1 1 1 22 2 2

1 1 12

12

1

[( )( )]

[ ] [ ]

, 0,1,2,...1

k t t t t k t k t kk k

t k t kk

E

E E

k

γ ε β ε β ε ε β ε β ε

β ε β ε

β σβ

− − − − − − −

+− − −

= + + + + + +

= + +

= =−

Autocorrelation function 10

, 0,1,2,...kkk kγρ β

γ= = =

Diminishes with k

But for each k ~ does not depend on t

-1.0

-0.5

0.0

0.5

1.0

4 8 12 16 20 24 28Lag

ACF

Series: Y

Page 20: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 20

Remark Unconditional vs Conditional Moments

Page 21: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 21

tY Stationary Ergodic

- Stationary - tY and t kY − asymptotically independent as k →∞

E.g. White noise process is stationary ergodic E.g. Stationary AR(1) is stationary ergodic

-1.0

-0.5

0.0

0.5

1.0

4 8 12 16 20 24 28Lag

ACF

Series: Y

Page 22: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 22

Non-Stationary Series Series can be non-stationary in many many many ways… We focus on two special cases… Difference Stationary Processes Non-stationary, but can be made stationary by taking first differences

- tY non-stationary - 1t t tY Y Y −∆ = − stationary

Alt names: “ tY is integrated of order one”,

“ tY is I(1)”,

“ tY has a unit root”,…

Page 23: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 23

Example

Random Walk 20 1 , ~(0, )

iid

t t t tY Yδ ε ε σ−= + +

i.e., tY changes by average of 0δ evert period

1 0t t tY Y δ ε−− = +

How does this series behave

1 0 0 1Y Yδ ε= + + 21 0 0 0 1 0[ | ] , var[ | ]E Y Y Y Y Yδ σ= + =

2 0 1 2 0 0 2 12Y Y Yδ ε δ ε ε= + + = + + + 22 0 0 0 2 0[ | ] 2 , var[ | ] 2E Y Y Y Y Yδ σ= + =

3 0 2 3 0 0 3 2 13Y Y Yδ ε δ ε ε ε= + + = + + + + 23 0 0 0 3 0[ | ] 3 , var[ | ] 3E Y Y Y Y Yδ σ= + =

0 1 0 0 1 1t t t t tY Y t Yδ ε δ ε ε ε− −= + + = + + + + + 20 0 0 0[ | ] , var[ | ]t tE Y Y t Y Y Y tδ σ= + =

Page 24: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 24

When 0 0δ ≠ there is a linear deterministic trend

Even if 0 0δ = variance increases without bound

Page 25: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 25

A random selection of random walks (without drift)

0

0 1 0 0 1 1

"drift" "stochastic trend" drift parmeter

t t t t tY Y t Y

δ

δ ε δ ε ε ε− −= + + = + + + + +

The RW is the simplest difference stationary series

Many others that include cycles and other features…

Page 26: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 26

Trend Stationary Processes ( ) (stationary process)tY f t= +

E.g. 0 1t tY tβ β ε= + + “linear deterministic trend

E.g. 20 1 2t tY t tβ β β ε= + + + “linear deterministic quadratic trend”

Many more…

Application to log(SG_IP) (can estimate by OLS)

Page 27: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 27

E.g. 20 0 1, , | | 1 , ~ (0, )

iid

t t t t t tY t u u uβ β ρ ε ρ ε σ−= + + = + <

E.g. Random Walk with Drift is not trend stationary

0

0 1 0 0 1 1

"drift" "stochastic trend" drift parmeter ~ not stationary

t t t t tY Y t Y

δ

δ ε δ ε ε ε− −= + + = + + + + +

Page 28: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 28

OLS Estimation of Linear Regression Models with Time Series Data

t t tY ε′= +x β

Reminder: tx may include lags of regressors and lags of dependent variable

E.g. 0 1 2 1 1t t t p t p tY X X Xβ β β β ε− + −= + + + + +

11t t t t pY X X− −′ = x 0 1 2 1pβ β β β +′ = β

E.g. 0 1 1 2 3 1 2t t t t t t p t p tY Y X X Xε β β β β β ε− − + −′= + = + + + + + +x β

11t t t t pY X X− −′ = x 0 1 2 2pβ β β β +′ = β

Page 29: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 29

Case 1 Time Series are Stationary Ergodic

B1 The stochastic processes in 1{ , }Tt t tY =x are stationary and

ergodic, and related according to t t tY ε′= +x β , where B2 1 1 2 2[ | , , , , ,...] 0t t t t t tE ε ε ε− − − − =x x x . This assumption implies all of the following:

B2a 1 2[ | , ,...] 0t t tE ε ε ε− − = , B2a [ ] 0tE ε = , B2b [ | ] 0t tE ε =x , (i.e., tε is contemporaneously exogenous) B2c [ ] 0t tE ε =x , B2d 1 1 2 2[ | , ,...] 0t t t t t tE ε ε ε− − − − =x x x , B2e 2var[ ] [ ]t t t t tEε ε ′=x x x .

B3 [ ]t tE ′ = xxx x Σ is finite and non-singular. B4 2[ ]t t tE ε ′ =x x S is positive definite. B5 2[( ) ]tk tjE X X is finite for all 1,...,t T= , , 1,...,j k K=

Page 30: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 30

Remarks: tY is a martingale difference series (mds) if 1 2[ | , ,...] 0t t tE Y Y Y− − = for all t MDS are - zero-mean:

1 2[ ] [ [ | , ,...]] [0] 0t t t tE Y E E Y Y Y E− −= = = - serially uncorrelated:

1 1[ ] [ [ | ,...]] [ [ | ,...]] [ 0] 0t t k t t k t t k t t t kE Y Y E E Y Y Y E Y E Y Y E Y− − − − − −= = = = - 1 2var[ | , ,...]t t tY Y Y− − can depend on 1 2, ,...t tY Y− − Our assumptions imply tε is

- mds (therefore zero-mean, serially uncorrelated) - Can be conditionally heteroskedastic, but unconditionally homoskedastic

since { , }t tY x are stationary

Page 31: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 31

Implicit in our assumption that tε is serially uncorrelated:

- We are considering dynamically complete models

- Enough lags of tY and regressors included in regression

E.g. (*) 20 1 1, , | | 1, ~ (0, )t t t t t t t iidY X u u uβ β ρ ε ρ ε σ−= + + = + <

Not dynamically complete

(*) ⇒ 21 0 1 1(1 ) ( ) , ~ (0, )t t t t t t iidY Y X Xρ β ρ β ρ ε ε σ− −− = − + − +

⇒ 20 1 1 1 2 1 , ~ (0, )t t t t t t iidY Y X Xα α α α ε ε σ− −= + + + + (**)

(**) is dynamically complete specification

Page 32: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 32

Consistency

Relies on following extension to LLN

(LLN) If tz is stationary and ergodic with [ ]tE = < ∞z μ , then

11 T

t ptT =→∑ z μ.

Note that serial correlation in tz is allowed.

Asymptotic Normality

Relies on following extension to CLT

(CLT) If tz is a stationary and ergodic mds with [ ]t tE ′ =z z Σ, then

11 ( , )T

t dt NT =

→∑ z 0 Σ .

Page 33: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 33

Proof of consistency of OLS estimator (B1-B3)

( )( )

1

1 1

11

1 1 1 1

ˆ

1 1

T Tt t t tt t

T T T Tt t t t t t t tt t t t

Y

T Tε ε

= =

−−

= = = =

′=

′ ′= + = +

∑ ∑

∑ ∑ ∑ ∑

β x x x

β x x x β x x x

Assumptions (and LLN) gives us 1

11

1 Tt t ptT

−−

= ′ → ∑ xxx x Σ

11 T

t t ptTε

=→∑ x 0

1

1

1 11 1ˆ

pp

T Tt t t t pt tT T

ε

= =

→→

′= + → ∑ ∑

xx0Σ

β β x x x β

Impt: note that serial non-correlation (though assumed) is not required here.

Page 34: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 34

Proof of Asymptotic Normality of OLS Estimators (B1-B4) 1 1ˆ( ) ( , )dT N − −− → xx xxβ β 0 Σ SΣ

where 2[ ]t t tE ε ′ =x x S (var matrix of t tεx )

From 1

1 11 1ˆ T T

t t t tt tT Tε

= = ′= + ∑ ∑β β x x x

we have 1

11ˆ( ) T

t ttT T

= ′− = ∑β β x x x where

1(1/ ) T

t ttTε ε

== ∑x x

1

11 1

1( , )

1ˆ( ) ( , )d

p

Tt t dt

N

T T NT

ε

−− −

=→

′− = → ∑

xx

xx xx0 S

Σ

β β x x x 0 Σ SΣ

where we use the fact that t tεx is a stationary ergodic mds with var[ ]t tε =x S

1 11ˆvar[ ]T

− −≈ xx xxβ Σ SΣ

Page 35: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 35

How to estimate 1 11ˆvar[ ]T

− −≈ xx xxβ Σ SΣ ?

- 1

(1/ ) Tt t pt

T=

′ →∑ xxx x Σ Use 1

11

1 Tt ttT

−−

= ′= ∑xxΣ x x

- If B5 also holds, then 21

1ˆ ˆTt t t ptTε

=′= →∑S x x S (proof omitted)

Therefore, use

1 11ˆ ˆˆ ˆvar[ ] T− −= xx xxβ Σ SΣ

Page 36: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 36

If not working with dynamically complete models, then may have serial correlation in

tε , t tεx

OLS estimators still consistent, but 1 11ˆ ˆˆ ˆvar[ ] T− −= xx xxβ Σ SΣ not appropriate

Must incorporate serial correlation

- Use “HAC” estimator for the var matrix

- One version:

1 2 1111 1 1

**

ˆ ˆ ˆˆ ˆ ˆ ˆ ˆvar[ ] [1 ] ( )T q Tvt t t t t t v t v t v t v t tT qt v t vε ε ε ε ε− −

− − − −+= = = +

′ ′ ′= + − + ∑ ∑ ∑xx xxβ Σ x x x x x x Σ

Page 37: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 37

Simulation Example

10.8 0.8 , ~ (0,1)iid

t t t tX X Nε ε−= + +

10.8 , 0.95 , ~ (0,1)iid

t t t t t tY u u u v v N−= + = +

Regress 0 1t t tY X wβ β= + +

Variable est. std. err. t-stat. p. val. OLS (Intercept) 2.830 0.505 5.602 0.000 *** X -0.382 0.131 -2.910 0.0045 *** HC (Intercept) 2.830 0.484 5.842 0.0000 *** X -0.382 0.122 -3129 0.0023 *** HAC (Intercept) 2.830 0.959 2.951 0.0040 *** X -0.382 0.237 -1.609 0.1109

Page 38: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 38

Suppose (with same data set) we take a dynamically complete approach

Suppose we try 0 1 1 2 3 1t t t t tY Y X X uα α α α− −= + + + +

Residual

ACF

Variable est. std. err. t-stat. p. val. (Intercept) 0.237 0.309 0.767 0.445

tX 0.017 0.094 0.184 0.855

1tY − 0.893 0.051 17.549 0.000 ***

1tX − -0.051 0.094 -0.545 0.587

Page 39: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 39

Alternative to OLS – Generalized Least Squares

Suppose SLR with zero-mean stat. AR(1) errors

0 1t t tY Xβ β ε= + + , 1t t tuε ρε −= + , | | 1ρ <

Try to get efficient estimates

- Modify regression so that errors are not serially uncorrelated

- Run OLS on modified regression

Given set-up, how? Do quasi-differencing

0

1 0 1 1 1

" "" " " "

(1 ) ( ) ( )tt t

t t t t t t

uY X

Y Y X Xα

ρ β ρ β ρ ε ρε− − −− = − + − + −

0 1t t tY X uα β= + + run OLS on this regression

GLS estimators 11 2

1

( )

( )

Tt tt

Ttt

X X Y

X Xβ =

=

−=

∑∑

, 0 1Y Xα β= −

, 0β = 0 / (1 )α ρ−

If suitable assumptions satisfied, get consistent and efficient estimators

Page 40: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 40

Issues:

- Need to know form of the serial correlation

o Maybe not so bad – run OLS and check residual dynamics, maybe residual

acf may suggest a form

o Modification to original regression relies on form of dynamics (our

modification suitable for AR(1) errors only)

- Need to estimate parameters (in our example, ρ is actually not known)

o Maybe not so bad – run OLS, and use residuals to estimate ρ

o Do quasi-differencing with ρ̂ instead of ρ

Page 41: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 41

- Run OLS, get 0 1ˆ ˆ

t̂ t tY Xε β β= − −

- Regress t̂ε on 1t̂ε − , get 122

12

ˆ ˆˆ ( 0.938 in our example)

ˆ

Tt tt

Ttt

ε ερ

ε−=

−=

= =∑∑

- Do quasi-differencing 1ˆt t tY Y Yρ −= − , 1ˆt t tX X Xρ −= − ,

- Regress tY on ˆ(1 )ρ− and tX

Estimated regression: ˆ 1.097 0.024

(0.786) (0.091)t tY X= +

Variable est. std. err. t-stat. p. val.

HAC (Intercept) 2.830 0.959 2.951 0.0040 ***

X -0.382 0.237 -1.609 0.1109

GLS ˆ1 ρ− 1.097 0.786 1.396 0.1658

*X 0.024 0.091 0.259 0.7961

Page 42: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 42

What is the consistency requirement?

- We need contemporaneous exogeneity in modified regression, i.e.,

[ | ] 0t tE u X = i.e., 1 1[ | ] 0t t t tE X Xε ρε ρ− −− − =

- Need tε uncorrelated with tX and 1tX −

- Need 1tε − uncorrelated with tX and 1tX −

- Require at least 1 1[ | , , ] 0t t t tE X X Xε + − =

- In terms of original equation, contemporaneous exogeneity not sufficient

A fourth approach? Since 0 1 1 1 1(1 )t t t t tY Y X X uβ ρ ρ β ρβ− −= − + + − + ,

Choose 0 1, ,β ρ β to minimize 20 1 1 1 1

2( (1 ) )

T

t t t tt

Y Y X Xβ ρ ρ β ρβ− −=

− − − − +∑

Page 43: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 43

Essentially the same as FGLS

Case No. 2

Regression with Trend Stationary Variables

Suppose

- tY and tX are trending linearly, but are trend stationary

- 0 1t t tY Xβ β ε= + + will always produce significant 1β

- Omitted variable problem

Solution

- Include time trend

0 1 2t t tY t Xβ β β ε= + + +

Page 44: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 44

E.g. Regression on Seasonal Data

- Suppose tY and tX both seasonal

- Regression of tY on tX will produce strong relationship because both seasonal

- Regression simply catches that fact

- Omitted variable problem

Solution 1

- Include Seasonal Dummies

e.g. For monthly data

1 2 , 3 , 12 , 1t feb t mar t dec t t tY d d d Xβ β β β α ε= + + + + + +

Solution 2 - Use seasonally adjusted data

Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Jan 1983 1 0 0 0 0 0 0 0 0 0 0 0 Feb 1983 0 1 0 0 0 0 0 0 0 0 0 0 Mar 1983 0 0 1 0 0 0 0 0 0 0 0 0 Apr 1983 0 0 0 1 0 0 0 0 0 0 0 0 May 1983 0 0 0 0 1 0 0 0 0 0 0 0 Jun 1983 0 0 0 0 0 1 0 0 0 0 0 0 Jul 1983 0 0 0 0 0 0 1 0 0 0 0 0 Aug 1983 0 0 0 0 0 0 0 1 0 0 0 0 Sep 1983 0 0 0 0 0 0 0 0 1 0 0 0 Oct 1983 0 0 0 0 0 0 0 0 0 1 0 0 Nov 1983 0 0 0 0 0 0 0 0 0 0 1 0 Dec 1983 0 0 0 0 0 0 0 0 0 0 0 1 Jan 1984 1 0 0 0 0 0 0 0 0 0 0 0 Feb 1984 0 1 0 0 0 0 0 0 0 0 0 0 Mar 1984 0 0 1 0 0 0 0 0 0 0 0 0 Apr 1984 0 0 0 1 0 0 0 0 0 0 0 0 May 1984 0 0 0 0 1 0 0 0 0 0 0 0 Jun 1984 0 0 0 0 0 1 0 0 0 0 0 0

Page 45: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 45

Case No. 3 Regression on Difference-Stationary Data

To highlight issues, we explore two special cases

E.g. A Suppose tY and tX are independent random walks…

1 1

1 2

t t t

t t t

Y YX X

εε

= +

= +

Regress 0 1t t tY Xβ β ε= + + . What happens?

Simulation experiment on 200 pairs of independent random walks…

Page 46: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 46

E.g. B Suppose tY and tX are I(1), but tY is I(1) because it is related to tX

1

1 2

0.3 0.9t t t

t t t

Y XX X

εε−

= + +

= +

Regress 0 1t t tY Xβ β ε= + + . What happens?

“Superconsistent”

Page 47: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 47

Example B is example of cointegration

tY and tX are I(1) variables (variances increase without bound)

Yet they ‘stay together’

1(0.3 0.9 ) ~ stationary "I(0)"t t tY X ε− + =

In Example A, tY and tX are I(1) variables but not cointegrated

For all 0 1,β β :

0 1 1 0 1 1 1 1 2( ) ( ) ( )t t t t t tY X Y Xβ β β β ε β ε− −− − = − − + −

0 1( )t tY Xβ β− + is I(1), i.e., tY and 0 1 tXβ β+ wander far from each other

In regression on I(1) variables,

- estimates are superconsistent in cointegration cases

- tend to be spurious in non-cointegrated cases

Page 48: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 48

Questions:

1. Difference Stationary or Trend Stationary?

2. If variables are difference stationary, Spurious or Superconsistent?

For Question 1 – do a “unit root test”

- There are many many unit root tests

- We will use the “Phillips-Perron” test for this course

Page 49: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 49

Phillips-Perron Test

Regress either

a. 1t t tY Y uρ −∆ = + use if tY is known to be zero-mean

b. 1t t tY Y uα ρ −∆ = + +

c. 1t t tY t Y uα δ ρ −∆ = + + + use if tY has a clear trend

Test 0 : 0H ρ = vs : 0AH ρ < (left tailed test)

- If 0ρ = , tY is difference stationary.

Issues: tu may be serially correlated

t-statistic does not have t-distribution

Phillips-Perron test uses the appropriate critical values (programmed into eviews, etc.)

Page 50: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 50

Example Consider SG (log) consumption and (log) GDP, 1975Q1 to 2011Q2.

Both are difference-stationary

Null Hypothesis: LCONS has a unit root Exogenous: Constant, Linear Trend Bandwidth: 0 (Newey-West automatic) using Bartlett kernel

Adj. t-Stat Prob.* Phillips-Perron test statistic -1.799336 0.7002

Test critical values: 1% level -4.022586 5% level -3.441111 10% level -3.145082 *MacKinnon (1996) one-sided p-values.

Null Hypothesis: LGDP has a unit root Exogenous: Constant, Linear Trend Bandwidth: 3 (Newey-West automatic) using Bartlett kernel

Adj. t-Stat Prob.* Phillips-Perron test statistic -1.842081 0.6791

Test critical values: 1% level -4.022586 5% level -3.441111 10% level -3.145082 *MacKinnon (1996) one-sided p-values.

Page 51: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 51

Question 2 Assuming difference-stationary variables

Is regression spurious?

Cointegrated case: there is 0 1,β β st 0 1 1( ) ~ stationary "I(0)"t t tY Xβ β ε− + =

Non-cointegrated case: there is no 0 1,β β st 0 1 1( ) ~ stationary "I(0)"t t tY Xβ β ε− + =

Solution: check if residuals are I(1)

Example Consumption function 0 1t t tC Yβ β ε= + +

Using Singapore data from 1975Q1 to 2011Q2 ˆ 0.753 0.843

(0.059) (0.006)tt YC = +

t-stat on tY is 143.623, 2 0.993R =

Spurious?

Page 52: Yt ttx T xβ 1 tt t

ECON207 Session 6 Slide 52

- Cannot reject unit root in residuals

- Based on this test, spurious

regression

Cointegration Test - Phillips-Ouliaris Date: 07/09/21 Time: 14:30 Equation: EQ1 Specification: LCONS LGDP C Cointegrating equation deterministics: C Null hypothesis: Series are not cointegrated Long-run variance estimate (Bartlett kernel, Newey-West fixed bandwidth = 5.0000) No d.f. adjustment for variances

Value Prob.*

Phillips-Ouliaris tau-statistic -2.277108 0.3880 Phillips-Ouliaris z-statistic -9.568306 0.3782

*MacKinnon (1996) p-values.