Sei sulla pagina 1di 21

VAR and VEC

Using Stata
VAR: Vector Autoregression


Assumptions:
y
t
: Stationary K-variable vector
v: K constant parameters vector
A
j
: K by K parameters matrix, j=1,,p
u
t
: i.i.d.(0,E)
Exogenous variables X may be added
1
1,...,
p
t j t j t
j
t T

=
= + +
=

y v A y u
VAR and VEC
If y
t
is not stationary, VAR or VEC can only
be applied for cointegrated y
t
system:

VAR (Vector Autoregression)
VEC (Vector Error Correction)

1
1
1
1
p
t j t j t
j
p
t t j t j t
j


=
= + +

A = + + A +

y v A y u
y v y y u
VEC: Vector Error Correction
If there is no trend in y
t
, let H = o| (H is K
by K, o is K by r, | is K by r, r is the rank of
H, 0<r<K):
( )
1
1
1
'
1
'
1
1
, ( ) 0
p
t t j t j t
j
p
t t j t j t
j


=
A = + + A +
= + =
A = + + A + +

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 = o)
Constant or Drift Model:
0, 0
( )
1
'
1
1
p
t t j t j t
j


=
A = + + A + +

y y y u
VEC: Vector Error Correction
If there is trend in y
t

( )
1
1
1
1
'
'
1
'
1
1
, ( ) 0
, ( ) 0
p
t j t j t
j
p
t t j t j t
j
p
t t j t j t
j
t
t
t t t
t t


=
= + + +

A = + + A + +
= + =
= + =
A = + + + A + + +

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, t = 0, = 0 (or v = 0, o = 0)
Restricted-constant Model:
= 0, 0, t = 0, = 0 (or v = o, o = 0)
Constant or Drift Model:
0, 0, t = 0, = 0 (or o = 0)
Restricted-trend Model:
0, 0, t = 0, 0 (or o = o)
Trend Model:
0, 0, t 0, 0

( )
1
'
1
1
p
t t j t j t
j
t t


=
A = + + + A + + +

y y y u
Example
C: Personal Consumption Expenditure
Y: Disposable Personal Income
C ~ I(1), Y ~ I(1)
Consumption-Income Relationship:
C
t
= o + |Y
t-1
+ C
t-1
+(+ ot) + c
Cointegrated C and I: c ~ I(0)
Johansen Test with constant model and 10
lags
Example
VAR:


VEC:


Rank 1 H = o|
10
1
1
1
c cc cy ccj cyj t j ct t t
j
y yc yy ycj yyj t j yt t t
v C u C C
v Y u Y Y
t t t t
t t t t

=

A A ( ( ( ( ( ( (
= + + +
( ( ( ( ( ( (
A A

11
1
c ccj cyj t j ct
t
j
y ycj yyj t j yt
t
v a a C u
C
v a a Y u
Y

( ( ( (
(
= + +
( ( ( (
(

10
1
1
1
c c ccj cyj t j ct t t
c y
j
y y ycj yyj t j yt t t
v C u C C
v Y u Y Y
o t t
| |
o t t

=

A A ( ( ( ( ( ( (
( = + + +
( ( ( ( ( ( (

A A

Example
Empirical Model: 1949q4 2006q4
Constant, 10 lags



Restricted-constant, 10 lags
*
1 *
*
1
10
1
0.00097 0.0059
1 1.131 1.405
0.0284 0.0002
t t
t t
ccj cyj t j ct
j
ycj yyj t j yt
C C
Y Y
C u
Y u
t t
t t

A | | ( ( ( (
( = + + +
| ( ( ( (

A
\ .
A ( ( (
+
( ( (
A

*
1 * *
*
1
10
1
0 0.0068
1 1.273 3.078
0 0.0097
t t
t t
ccj cyj t j ct
j
ycj yyj t j yt
C C
Y Y
C u
Y u
t t
t t

A | | ( ( ( (
( = + + +
| ( ( ( (

A
\ .
A ( ( (
+
( ( (
A

Example (Y = PCE)
9
9
.
0
5
9
.
1
2006q3 2007q1 2007q3 2008q1 2008q3
Forecast for y
95% CI forecast
observed
Example (X = DPI)
9
.
0
5
9
.
1
9
.
1
5
2006q3 2007q1 2007q3 2008q1 2008q3
Forecast for x
95% CI forecast
observed
Unrestricted VAR


11
1
c ccj cyj t j ct
t
j
y ycj yyj t j yt
t
v a a C u
C
v a a Y u
Y

( ( ( (
(
= + +
( ( ( (
(

9
9
.
0
5
9
.
1
9
9
.
0
5
9
.
1
9
.
1
5
2006q3 2007q1 2007q3 2008q1 2008q3 2006q3 2007q1 2007q3 2008q1 2008q3
Forecast for y Forecast for x
95% CI forecast
observed
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 t
j
p
j t t
j
p
t j t
j
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 t
j
L

=
= +

y I A u
VAR and Simultaneous Equations





Identification:
A = -B
-1
I, u
t
= B
-1
c
t

A = [A
1
,,A
p
,v], I = [I
1
,, I
p
,
0
]
B and I
1
,,I
p
are K by K parameters matrices
Var(u
t
) = E = B
-1
Var(c
t
)B
-1
1
0
1
1,...,
p
t j t j t
j
p
t j t j t
j
t T

=
= + +
l =
+ + =

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 E of VAR.
Example
2-Equation System Model:


Structural VAR:


11
1
1
1
cy c ccj cyj t j ct
t
j
yc y ycj yyj t j yt
t
C
C
Y
Y
| c
| c

( ( ( ( (
(
= + +
( ( ( ( (
(

11
1
c ccj cyj t j ct
t
j
y ycj yyj t j yt
t
a a a C u
C
a a a Y u
Y

( ( ( (
(
= + +
( ( ( (
(

Example
Structural VAR:


Identification and Parameters Restrictions

11
1
c ccj cyj t j ct t
j
y ycj yyj t j yt t
a a a C u C
a a a Y u Y

( ( ( (
(
= + +
( ( ( (
(

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 a
j
a a a
u
u
| |
| |
| c
| c

( ( ( ( ( (
= = =
( ( ( ( ( (

( ( (
=
( ( (

1 1
1 var( ) 0 1
1 0 var( ) 1
ct cy ct cy
yt yc yt yc
u
Var
u
| c |
| c |

| |
( ( ( (
= =
|
( ( ( (
|

\ .

Stata Programs
us_dpi_pce.txt
dpi_pce4.do
dpi_pce5.do
dpi_pce6.do
dpi_pce7.do

Potrebbero piacerti anche