Upload
rosh-otojanov
View
8
Download
2
Embed Size (px)
Citation preview
VAR and VEC
Using Stata
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
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
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
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
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
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
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
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
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
Example (Y = PCE)
99.
059.
1
2006q3 2007q1 2007q3 2008q1 2008q3
Forecast for y
95% CI forecastobserved
Example (X = DPI)
9.05
9.1
9.15
2006q3 2007q1 2007q3 2008q1 2008q3
Forecast for x
95% CI forecastobserved
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
Restricted VAR
• Parameters Restrictions– Many of the parameters associated with
augmented lags are 0
• Structural VAR– Linking with macroeconomic theory
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
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
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 γ ε
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.
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
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
Σ
Stata Programs
• us_dpi_pce.txt
• dpi_pce4.do
• dpi_pce5.do
• dpi_pce6.do
• dpi_pce7.do