econometrics i - new york...

37
Part 22: Time Series 22-1/37 Econometrics I Professor William Greene Stern School of Business Department of Economics

Upload: others

Post on 22-Apr-2020

53 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-1/37

Econometrics I Professor William Greene

Stern School of Business

Department of Economics

Page 2: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-2/37

Econometrics I

Part 22 – Time Series

Page 3: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-3/37

Modeling an Economic Time Series

Observed y0, y1, …, yt,…

What is the “sample?” Realization of the

entire sequence?

Random sampling? Not really possible.

We are using a different type of statistics.

The “observation window”

Page 4: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-4/37

Estimators

Functions of sums of correlated observations

Law of large numbers?

Non-independent observations

What does “increasing sample size” mean?

Asymptotic properties? (There are no finite

sample properties.)

Page 5: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-5/37

Interpreting a Time Series

Time domain: A “process”

y(t) = ax(t) + by(t-1) + …

Regression like approach/interpretation

Frequency domain: A sum of terms

y(t) =

Contribution of different frequencies to the observed

series.

(“High frequency data and financial econometrics

– “frequency” is used slightly differently here.)

( ) ( )j jjCos t t

Page 6: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-6/37

For example,…

Page 7: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-7/37

In parts…

Page 8: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-8/37

Studying the Frequency Domain

Cannot identify the number of terms

Cannot identify frequencies from the time series

Deconstructing the variance, autocovariances

and autocorrelations

Contributions at different frequencies

Apparent large weights at different frequencies

Using Fourier transforms of the data

Does this provide “new” information about the series?

Page 9: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-9/37

Stationary Time Series

yt = b1yt-1 + b2yt-2 + … + bPyt-P + et

Autocovariance: γk = Cov[yt,yt-k]

Autocorrelation: k = γk / γ0

Stationary series: γk depends only on k, not on t

Weak stationarity: E[yt] is not a function of t, E[yt * yt-s] is not a function of t or s, only of |t-s|

Strong stationarity: The joint distribution of [yt,yt-1,…,yt-s] for any window of length s periods, is not a function of t or s.

A condition for weak stationarity: The smallest root of the characteristic polynomial: 1 - b1z

1 - b2z2 - … - bPzP = 0, is greater

than one.

The unit circle

Complex roots

Example: yt = yt-1 + ee, 1 - z = 0 has root z = 1/ , | z | > 1 => | | < 1.

Page 10: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-10/37

Stationary vs. Nonstationary Series

Page 11: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-11/37

The Lag Operator

Lxt = xt-1

L2 xt = xt-2

LPxt + LQxt = xt-P + xt-Q

Polynomials in L: yt = B(L)yt + et

A(L) yt = et

Invertibility: yt = [A(L)]-1 et

Page 12: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-12/37

Inverting a Stationary Series

yt= yt-1 + et (1- L)yt = et

yt = [1- L]-1 et = et + et-1 + 2et-2 + …

Stationary series can be inverted

Autoregressive vs. moving average form of series

2 311 ( ) ( ) ( ) ...

1L L L

L

Page 13: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-13/37

Autocorrelation

How does it arise?

What does it mean?

Modeling approaches Classical – direct: corrective

Estimation that accounts for autocorrelation

Inference in the presence of autocorrelation

Contemporary – structural Model the source

Incorporate the time series aspect in the model

Page 14: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-14/37

Regression with Autocorrelation

yt = xt’b + et, et = et-1 + ut

(1- L)et = ut et = (1- L)-1ut

E[et] = E[ (1- L)-1ut] = (1- L)-1E[ut] = 0

Var[et] = (1- L)-2Var[ut] = 1+ 2u2 + … = u

2/(1- 2)

Cov[et,et-1] = Cov[et-1 + ut, et-1] =

=Cov[et-1,et-1]+Cov[ut,et-1] = u2/(1- 2)

Page 15: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-15/37

Autocorrelation in Regression

Yt = b’xt + εt

Cov(εt, εt-1) ≠ 0

Ex. RealConst = a + bRealIncome + εt U.S. Data, quarterly, 1950-2000

Page 16: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-16/37

Generalized Least Squares

Efficient estimation of and, by implication, the inefficiency of least squares b.

= (X*’X*)-1X*’y*

= (X’P’PX)-1 X’P’Py

= (X’Ω-1X)-1 X’Ω-1y

≠ b. is efficient, so by construction, b is not.

β̂

β̂ β̂

Page 17: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-17/37

Autocorrelation

t = t-1 + ut

(‘First order autocorrelation.’ How does this come about?)

Assume -1 < < 1. Why?

ut = ‘nonautocorrelated white noise’

t = t-1 + ut (the autoregressive form)

= (t-2 + ut-1) + ut

= ... (continue to substitute)

= ut + ut-1 + 2ut-2 + 3ut-3 + ...

= (the moving average form)

Page 18: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-18/37

Autocorrelation

2

t t t 1 t 1

i

t ii=0

22i 2 u

u 2i=0

t t 1 t t 1 t

2

t t 1 t t 1 t

Var[ ] Var[u u u ...]

= Var u

=1

An easier way: Since Var[ ] Var[ ] and u

Var[ ] Var[ ] Var[u ] 2 Cov[ ,u ]

=

2 2

t u

2

u

2

Var[ ]

1

Page 19: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-19/37

Autocovariances

t t 1 t 1 t t 1

t 1 t 1 t t 1

t-1 t

2

u

2

t t 2 t 1 t t 2

Continuing...

Cov[ , ] = Cov[ u , ]

= Cov[ , ] Cov[u , ]

= Var[ ] Var[ ]

=(1 )

Cov[ , ] = Cov[ u , ]

t 1 t 2 t t 2

t t 1

2 2

u

2

= Cov[ , ] Cov[u , ]

= Cov[ , ]

= and so on.(1 )

Page 20: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-20/37

Autocorrelation Matrix

2 1

2

22 2 3

2

1 2 3

1

1

11

1

(Note, trace = n as required.)

Ω

Ω

T

T

u T

T T T

Page 21: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-21/37

Generalized Least Squares

2

1 /2

2

1

2 11 /2

3 2

T T 1

1 0 0 ... 0

1 0 ... 0

0 1 ... 0

... ... ... ... ...

0 0 0 0

1 y

y y

y y

...

y

Ω

Ω y =

Page 22: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-22/37

The Autoregressive Transformation

t t t t 1 t

t 1 t 1

t t 1 t t 1

t t 1 t

y u

y

y y ( ) + ( )

y y ( ) + u

(Note the first observation is lost.)

t

t-1

t t-1

t t-1

x 'β

x 'β

x x 'β

x x 'β

Page 23: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-23/37

Unknown

The problem (of course), is unknown. For now, we will consider two methods of estimation:

Two step, or feasible estimation. Estimate first, then do GLS. Emphasize - same logic as White and Newey-West. We don’t need to estimate . We need to find a matrix that behaves the same as (1/n)X-1X.

Properties of the feasible GLS estimator

Maximum likelihood estimation of , 2, and all at the same time.

Joint estimation of all parameters. Fairly rare. Some generalities…

We will examine two applications: Harvey’s model of heteroscedasticity and Beach-MacKinnon on the first order autocorrelation model

Page 24: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-24/37

Sorry to bother you again, but an important issue has come up. I am using

LIMDEP to produce results for my testimony in a utility rate case. I have a

time series sample of 40 years, and am doing simple OLS analysis using a

primary independent variable and a dummy. There is serial correlation

present. The issue is what is the BEST available AR1 procedure in LIMDEP

for a sample of this type?? I have tried Cochrane-Orcott, Prais-Winsten, and

the MLE procedure recommended by Beach-MacKinnon, with slight but

meaningful differences.

By modern constructions, your best choice if you are comfortable

with AR1 is Prais-Winsten. No one has ever shown that iterating it is better

or worse than not. Cochrance-Orcutt is inferior because it discards

information (the first observation). Beach and MacKinnon would be best, but

it assumes normality, and in contemporary treatments, fewer assumptions is

better. If you are not comfortable with AR1, use OLS

with Newey-West and 3 or 4 lags.

Page 25: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-25/37

OLS vs. GLS

OLS

Unbiased?

Consistent: (Except in the presence of a lagged

dependent variable)

Inefficient

GLS

Consistent and efficient

Page 26: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-26/37

The Newey-West Estimator

Robust to Autocorrelation

n 2

0 i i ii 1

L n

1 l t t l t t l t l tl 1 t l 1

l

Heteroscedasticity Component - Diagonal Elements

1e

n

Autocorrelation Component - Off Diagonal Elements

1w e e ( )

n

lw 1 = "Bartlett weight"

L 1

1Est.Var[ ]=

n

S x x '

S x x x x

Xb

1 1

0 1[ ]n n

'X X'XS S

Page 27: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-27/37

Page 28: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-28/37

Page 29: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-29/37

Detecting Autocorrelation

Use residuals

Durbin-Watson d=

Assumes normally distributed disturbances strictly

exogenous regressors

Variable addition (Godfrey)

yt = ’xt + εt-1 + ut

Use regression residuals et and test = 0

Assumes consistency of b.

2

2 1

2

1

( )2(1 )

T

t t t

T

t t

e er

e

Page 30: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-30/37

A Unit Root?

How to test for = 1?

By construction: εt – εt-1 = ( - 1)εt-1 + ut

Test for γ = ( - 1) = 0 using regression?

Variance goes to 0 faster than 1/T. Need a new table;

can’t use standard t tables.

Dickey – Fuller tests

Unit roots in economic data.

Nonstationary series

Implications for conventional analysis

Page 31: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-31/37

Integrated Processes

Integration of order (P) when the P’th differenced

series is stationary

Stationary series are I(0)

Trending series are often I(1). Then yt – yt-1 = yt

is I(0). [Most macroeconomic data series.]

Accelerating series might be I(2). Then

(yt – yt-1)- (yt – yt-1) = 2yt is I(0) [Money stock in

hyperinflationary economies. Difficult to find

many applications in economics]

Page 32: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-32/37

Cointegration: Real DPI and Real Consumption

Page 33: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-33/37

Cointegration – Divergent Series?

Page 34: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-34/37

Cointegration

X(t) and y(t) are obviously I(1)

Looks like any linear combination of x(t) and y(t) will also

be I(1)

Does a model y(t) = bx(t) + u(u) where u(t) is I(0) make

any sense? How can u(t) be I(0)?

In fact, there is a linear combination, [1,-] that is I(0).

y(t) = .1*t + noise, x(t) = .2*t + noise

y(t) and x(t) have a common trend

y(t) and x(t) are cointegrated.

Page 35: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-35/37

Cointegration and I(0) Residuals

Page 36: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-36/37

Reinterpreting Autocorrelation

1

1 1 1 1

t

t

Regression form

' ,

Error Correction Form

'( ) ( ' ) , ( 1)

' the equilibrium

The model describes adjustment of y to equilibrium when

x changes.

t t t t t t

t t t t t t t

t

y x u

y y x x y x u

x

Page 37: Econometrics I - New York Universitypeople.stern.nyu.edu/wgreene/Econometrics/Econometrics-I-22.pdf · Econometrics I Professor William Greene Stern School of Business Department

Part 22: Time Series 22-37/37