21
VAR and VEC Using Stata

var_vec

Embed Size (px)

Citation preview

Page 1: var_vec

VAR and VEC

Using Stata

Page 2: var_vec

VAR: Vector Autoregression

• Assumptions:– yt: Stationary K-variable vector

– v: K constant parameters vector

– Aj: K by K parameters matrix, j=1,…,p

– ut: i.i.d.(0,)

• Exogenous variables X may be added

1

1,...,

p

t j t j tj

t T

y v A y u

Page 3: var_vec

VAR and VEC

• If yt is not stationary, VAR or VEC can only be applied for cointegrated yt system:

– VAR (Vector Autoregression)– VEC (Vector Error Correction)

1

1

1 1

p

t j t j tj

p

t t j t j tj

y v A y u

y v Πy Π y u

Page 4: var_vec

VEC: Vector Error Correction

• If there is no trend in yt, let = ’ ( is K by K, is K by r, is K by r, r is the rank of 0<r<K):

1

1 1

'

1'1 1

, ( ) 0

p

t t j t j tj

p

t t j t j tj

y v Πy Π y u

v αμ γ γ αμ

y α β y μ Π y γ u

Page 5: var_vec

VEC: Vector Error Correction

• No-constant or No-drift Model: = 0, = 0 (or v = 0)

• Restricted-constant Model: = 0, ≠ 0 (or v = )

• Constant or Drift Model: ≠ 0, ≠ 0

1'1 1

p

t t j t j tj

y α β y μ Π y γ u

Page 6: var_vec

VEC: Vector Error Correction

• If there is trend in yt

1

1

1 1

'

'

1'1 1

, ( ) 0

, ( ) 0

p

t j t j tj

p

t t j t j tj

p

t t j t j tj

t

t

t t t

t t

y v A y δ u

y v Πy Π y δ u

v αμ γ γ αμ

δ αρ τ τ αρ

y α β y μ ρ Π y γ τ u

Page 7: var_vec

VEC: Vector Error Correction

• No-drift No-trend Model: = 0, = 0, = 0, = 0 (or v = 0, = 0)

• Restricted-constant Model: = 0, ≠ 0, = 0, = 0 (or v = , = 0)

• Constant or Drift Model: ≠ 0, ≠ 0, = 0, = 0 (or = 0)

• Restricted-trend Model: ≠ 0, ≠ 0, = 0, ≠ 0 (or = )

• Trend Model: ≠ 0, ≠ 0, ≠ 0, ≠ 0

1'1 1

p

t t j t j tjt t

y α β y μ ρ Π y γ τ u

Page 8: var_vec

Example

• C: Personal Consumption Expenditure

• Y: Disposable Personal Income

• C ~ I(1), Y ~ I(1)

• Consumption-Income Relationship:Ct = + Yt-1 + Ct-1 +…(+ t) +

• Cointegrated C and I: ~ I(0)– Johansen Test with constant model and 10

lags

Page 9: var_vec

Example

• VAR:

• VEC:

• Rank 1 = ’

101

11

c cc cy ccj cyj t j ctt t

jy yc yy ycj yyj t j ytt t

v C uC C

v Y uY Y

11

1

c ccj cyj t j ctt

jy ycj yyj t j ytt

v a a C uC

v a a Y uY

101

11

c c ccj cyj t j ctt tc y j

y y ycj yyj t j ytt t

v C uC C

v Y uY Y

Page 10: var_vec

Example

• Empirical Model: 1949q4 – 2006q4– Constant, 10 lags

– Restricted-constant, 10 lags

*1*

*1

10

1

0.00097 0.00591 1.131 1.405

0.0284 0.0002t t

t t

ccj cyj t j ct

jycj yyj t j yt

C C

Y Y

C u

Y u

*1* *

*1

10

1

00.00681 1.273 3.078

00.0097t t

t t

ccj cyj t j ct

jycj yyj t j yt

C C

Y Y

C u

Y u

Page 11: var_vec

Example (Y = PCE)

99.

059.

1

2006q3 2007q1 2007q3 2008q1 2008q3

Forecast for y

95% CI forecastobserved

Page 12: var_vec

Example (X = DPI)

9.05

9.1

9.15

2006q3 2007q1 2007q3 2008q1 2008q3

Forecast for x

95% CI forecastobserved

Page 13: var_vec

Unrestricted VAR

11

1

c ccj cyj t j ctt

jy ycj yyj t j ytt

v a a C uC

v a a Y uY

99.

059.

1

99.

059.

19.

15

2006q3 2007q1 2007q3 2008q1 2008q3 2006q3 2007q1 2007q3 2008q1 2008q3

Forecast for y Forecast for x

95% CI forecastobserved

Page 14: var_vec

Restricted VAR

• Parameters Restrictions– Many of the parameters associated with

augmented lags are 0

• Structural VAR– Linking with macroeconomic theory

Page 15: var_vec

VAR and VMA

1

1

1

1

p

t j t j tj

p

j t tj

p

t j tj

L

L

y v A y u

I A y v u

y μ I A u

Page 16: var_vec

Impulse Response Function

• Based on VMA representation, we can trace out the time path of the various shocks on the variables in the VAR system.

1

1

p

t j tjL

y μ I A u

Page 17: var_vec

VAR and Simultaneous Equations

• Identification:– A = -B-1, ut = B-1t

– A = [A1,…,Ap,v], = [1,…, p,0]

– B and 1,…,p are K by K parameters matrices

– Var(ut) = = B-1Var(t)B-1’

1

01

1,...,

p

t j t j tj

p

t j t j tj

t T

y v A y u

By Γ y γ ε

Page 18: var_vec

Structural VAR

• VAR as a reduced form of simultaneous equations model requires parameters restrictions so that the system model is identified or estimatable.

• A structural VAR corresponds to an identified simultaneous equations system.

• The restrictions are necessarily placed on the parameters matrix B and therefore the variance-covariance matrix of VAR.

Page 19: var_vec

Example

• 2-Equation System Model:

• Structural VAR:

11

1

1

1cy c ccj cyj t j ctt

jyc y ycj yyj t j ytt

CC

YY

11

1

c ccj cyj t j ctt

jy ycj yyj t j ytt

a a a C uC

a a a Y uY

Page 20: var_vec

Example

• Structural VAR:

• Identification and Parameters Restrictions

11

1

c ccj cyj t j ctt

jy ycj yyj t j ytt

a a a C uC

a a a Y uY

1 1

1

1 1, , 1,...,11

1 1

1

1

c cy c ccj cyj cy ccj cyj

y yc y ycj yyj yc ycj yyj

ct cy ct

yt yc yt

a a aj

a a a

u

u

1 1

1 var( ) 0 1

1 0 var( ) 1ct cy ct cy

yt yc yt yc

uVar

u

Σ