Introduction To Vars and Structural Vars:: Estimation & Tests Using Stata
Introduction To Vars and Structural Vars:: Estimation & Tests Using Stata
Introduction To Vars and Structural Vars:: Estimation & Tests Using Stata
σ i, j if t = τ
E (ε i ,t , ε j ,τ ) =
0 if t ≠ τ
i, j ∈ (1,2,3)
Simple VAR: Matrix Form
• In Matrix Form:
y t = α + Γt −1y t −1 + Γt − 2 y t − 2 + ... + ε t
or Simply :
[I − Γ(L )]y t = Α + ε t
• y t is a vector of the Dependent Variables
• Γt − i is a Matrix of Coefficients
• Γ(L ) is a Matrix in Lagged Variables
• ε t is a Vector of White Noise Errors
• Α is a Matrix of exogenous variables (constant,…)
ε 1 ,1
ε 1,2
ε
1,3
:
Covariance Matrix
ε
2 ,1
ε 2 ,2
ε t × ε t ' = (
× ε 1 ,1 ε 1 , 2 ε 1 , 3 ... ε 2 , 1 ε 2 , 2 ε 2 , 3 ... ε 3 , 1 ε 3 , 2 ε 3 , 3 ... )=
ε 2 ,1
:
ε 3 ,1
ε 3,2
ε 1 ,1
:
σ 1 ,1 0 0 ... σ 1,2 0 ... σ 1,3 0 ...
0 σ 1 ,1 0 ... 0 σ 1,2 ... 0 σ 1,3 ...
0 0 σ ... 0 0 ... 0 0 ...
1 ,1
: : : :
σ 0 0 ... σ
2 ,1 2 ,2
0 σ 2 ,1 0 ... σ 2 ,2 ... σ 2 ,3 0 ...
0 σ 2 ,1 ... 0 0 ... 0 σ 2 ,3 0
: : : :
σ 3 ,1 0 0 ... σ 3,2 0 ... σ 3 ,3 0 ...
0 σ 0 ... 0 σ ... 0 σ 0
3 ,1 3,2 3 ,3
:
Contemporary Variance Matrix
.05
d if fer ence household consumption
0 .01 .02 .03 .04
LR AIC BIC
.005
-.005
v arbas ic , inf lat ion, dc ons v arbas ic , inf lat ion, inf lat ion v arbas ic , inf lat ion, y
.01
.005
-.005
.005
-.005
0 5 10 15 0 5 10 15 0 5 10 15
s tep
95% CI orthogonali zed irf
Graphs by irf name, impuls e v ariable, and res pons e v ariable
Simple VAR: Variance
Decomposition Table
Generating After Estimation
• generate after estimation:
– Choose:
• Menu: Statistics
Multivariate time series IRF &
Variance Decomposition Analysis
• Choose the table or impulse response function that
you need
To get the results
• If you want to use some of the results:
• Coefficients
• Number of observations
• Etc…
– Stata keeps them under the ereturn command
Using the
constraints:
Forcing the
values in the
constrained
matrix
Structural VAR: Results
Structural VAR: Results
v arbas ic , dc ons , dc ons v arbas ic , dc ons , inf lat ion v arbas ic , dc ons , y
.01
.005
-.005
v arbas ic , inf lat ion, dc ons v arbas ic , inf lat ion, inf lat ion v arbas ic , inf lat ion, y
.01
.005
-.005
.005
-.005
0 5 10 15 0 5 10 15 0 5 10 15
s tep
95% CI orthogonali zed irf
Graphs by irf name, impuls e v ariable, and res pons e v ariable
Structural VARs
• Structural VAR: VAR that is the result
of a structural model
yt = α 0 + α1 yt −1 + α 2π t −1 + ε t
π t − β1 yt = β 0 + β 2 yt + β 3π t −1 + υt
In Matrix Form:
1 0 yt α 0t yt −1 ε t
= +
+
−
1 β 1 π π
t β 0 t −1 t υ
OR:
−1 −1 −1
yt 1 0 α 0t 1 0 yt −1 1 0 εt
= +
+
π t − β1 1 β 0 − β1 1 π t −1 − β1 1 υt
Inverting the Matrix gives
−1
1 0 1 0
=
− β1 1 β1 1
So we can substitute this in the equations:
We find:
yt = α 0 + α1 yt −1 + α 2π t −1 + ε t
π t = (β1α 0 + β 0 ) + (β1α1 + β 2 ) yt −1 + (β1α 2 + β3 )π t −1 + (β1ε t + υt )
yt = α 0 + α1 yt −1 + α 2π t −1 + ε t
π t = θ 0 + θ1 yt −1 + θ 2π t −1 + ηt
Almost there
• After estimating the VAR we can find:
(β1α 0 + β 0 ) = θ 0
(β1α1 + β 2 ) = θ1
(β1α 2 + β3 ) = θ 2
So we have three equations and four
unknowns…
Hakuna Matata
• We also have the covariance matrix:
σ ε ,ε σ ε ,η σ ε ,ε β1σ ε ,ε
=
σ ε ,η
ση ,η β1σ ε ,ε ( 2
β1σ ε ,ε + υt )
• So we have a fourth equation:
β1σ ε ,ε = σ ε ,η
Run the VAR
• Note that because we assume that the “real”
covariance matrix has the triangular form:
σ ε ,ε 0
β1σ ε ,ε σ ε ,ε
. 00 5
. 00 5
0
0 2 4 6 8 0 2 4 6 8
s tep
95% CI orthogonali zed irf
Graphs by irf name, impuls e v ariable, and res pons e v ariable
Get the coefficients
α1
α2
α0
θ1
θ2
θ0
Get the Errors matrix
σ ε ,ε
β1σ ε ,ε
We find: