Вы находитесь на странице: 1из 37

Kelikume Ikechukwu

ikelikume@lbs.edu.ng
CONTENT

Introduction

Vector Autoregressi ve Model s:


Notati on and Concepts

Choosi ng the Opti mal Lag Length for a VAR

Informati on Cri teri a for VAR Lag Length


Sel ecti on

Does the VAR Incl ude Contemporaneous


Terms?

Pri mi ti ve versus Standard Form VARs

Bl ock Si gni fi cance and Causal i ty Tests


Content

Testi ng for Granger causal i ty

Interpreti ng Granger Causal i ty Tests

Impul se Responses

Vari ance Decomposi ti ons

Impul se Responses and Vari ance Decomposi ti ons:


The Orderi ng of the Vari abl es
i . Esti mati ng a VAR i n E-vi ew
i i . VAR Esti mati on Output
i i i . Worki ng wi th a VAR
i v. Granger Causal i ty Tests
Introduction

Since the seminal work by Sims (1980)*, structural-


VAR and cointegrated VARs have been applied to
economic data to;
i. Forecast macro time series
ii. Study the sources of economic fluctuations
iii. Test economic theories
VAR resembles a simultaneous equation modeling
In VAR, we consider several endogenous variables
together. Each endogenous variables is explained by
its lagged values and the lagged values of all other
endogenous variables in the model.
Introduction

In the SEM model, some variables are treated as endogenous


and some are predetermined.

In estimating SEM, we have to make sure that the equation in


the system are identified this is achieved by assuming that
some of the predetermined variables are present only in some
equation (which is very subjective) and criticized by
Christopher Sims (1980)

If there is simultaneity among set of variables, they should all


be treated on equal footing, i.e., there should not be any a
priori distinction between endogenous and exogenous variables.

*Sims, C. A. (1980). Macroeconomics and Reality


Econometrica, 48 (10), pp.1-48.

A natural generalisation of autoregressive models


popularised by Sims (1980), is a framework, that has
more than one dependent variable.

The simplest case is a bivariate VAR


where u
it
is an iid disturbance with E(u
it
)=0, i=1,2; E(u
1t

u
2t
)=0.

The analysis could be extended to a VAR(p) model, or


so that there are p variables and p equations.
y y y y y u
y y y y y u
t t k t k t k t k t
t t k t k t k t k t
1 10 11 1 1 1 1 11 2 1 1 2 1
2 20 21 2 1 2 2 21 1 1 2 1 2
+ + + + + + +
+ + + + + + +




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

One important feature of VARs is the compactness


with which we can write the notation. For example,
consider the case from above where k=1.

We can write this as

or even more compactly as


y
t
=
0
+
1
y
t-1
+ u
t
px1 px1 pxp px1 px1
y
y
y
y
u
u
t
t
t
t
t
t
1
2
10
20
11 11
21 21
1 1
2 1
1
2

_
,

_
,

_
,

_
,

_
,

This model can be extended to the case where


there are k lags of each variable in each
equation:
y
t
=
0
+
1
y
t-1
+
2
y
t-2
+...+
k
y
t-k
+ u
t
p 1 p p p 1 p p p 1 p p p 1
p 1
We can also extend this to the case where the
model includes first difference terms and
co integrating relationships (a VECM).
q
In modelling unrestricted VAR, each equation
should have the same lag length
q
Suppose that a bivariate VAR(8) estimated
using quarterly data has 8 lags of the two
variables in each equation, and we want to
examine a restriction that the coefficients on
lags 5 through 8 are jointly zero. This can be
done using a likelihood ratio test.
q
Denote the variance-covariance matrix of residuals (given by
/T), as . The likelihood ratio test
q
for this joint hypothesis is given by

: variance-covariance matrix of the residuals for the
restricted model (with 4 lags),
: variance-covariance matrix of residuals for the
unrestricted VAR (with 8 lags), and T is the sample size.

The test statistic is asymptotically distributed as a


2
with
degrees of freedom equal to the total number of restrictions. In
the VAR case above, we are restricting 4 lags of two variables in
each of the two equations = a total of 4 *2 * 2 = 16
restrictions.
u u
[ ]
u r
T LR

log

log
r

In the general case where we have a VAR


with p equations, and we want to impose the
restriction that the last q lags have zero
coefficients, there would be p
2
q restrictions
altogether

Disadvantages: Conducting the LR test is


cumbersome and requires a normality
assumption for the disturbances.

Multivariate versions of the information criteria are


required. These can be defined as:
where all notation is as above and k is the total number
of regressors in all equations, which will be equal to p
2
k
+ p for p equations, each with k lags of the p variables,
plus a constant term in each equation. The values of the
information criteria are constructed for 0, 1, lags (up
to some pre-specified maximum ).
k
ln(ln(T))
2

ln
ln(T)

ln
/ 2

ln
T
k
MHQIC
T
k
MSBIC
T k MAIC

+
+

So far, we have assumed the VAR is of the form


But what if the equations had a contemporaneous


feedback term?

We can write this as


This VAR is in primitive form.
y y y u
y y y u
t t t t
t t t t
1 10 11 1 1 11 2 1 1
2 20 21 2 1 21 1 1 2
+ + +
+ + +




y y y y u
y y y y u
t t t t t
t t t t t
1 10 11 1 1 11 2 1 12 2 1
2 20 21 2 1 21 1 1 22 1 2
+ + + +
+ + + +




y
y
y
y
y
y
u
u
t
t
t
t
t
t
t
t
1
2
10
20
11 11
21 21
1 1
2 1
12
22
2
1
1
2
0
0

_
,

_
,

_
,

_
,

_
,

_
,

_
,

So far, we have assumed the VAR is of the form


But what if the equations had a contemporaneous


feedback term?

We can write this as


This VAR is in primitive form.
y y y u
y y y u
t t t t
t t t t
1 10 11 1 1 11 2 1 1
2 20 21 2 1 21 1 1 2
+ + +
+ + +




y y y y u
y y y y u
t t t t t
t t t t t
1 10 11 1 1 11 2 1 12 2 1
2 20 21 2 1 21 1 1 22 1 2
+ + + +
+ + + +




y
y
y
y
y
y
u
u
t
t
t
t
t
t
t
t
1
2
10
20
11 11
21 21
1 1
2 1
12
22
2
1
1
2
0
0

_
,

_
,

_
,

_
,

_
,

_
,

_
,

It is likely that, when a VAR includes many lags of


variables, it will be difficult to see which sets of variables
have significant effects on each dependent variable and
which do not. For illustration, consider the following
bivariate VAR(3):

This VAR could be written out to express the individual


equations as

,
_

,
_

,
_

,
_

,
_

,
_

,
_

,
_

,
_

t
t
t
t
t
t
t
t
t
t
u
u
y
y
y
y
y
y
y
y
2
1
3 2
3 1
2 2 2 1
1 2 1 1
2 2
2 1
2 2 2 1
1 2 1 1
1 2
1 1
2 2 2 1
1 2 1 1
2 0
1 0
2
1





t t t t t t t t
t t t t t t t t
u y y y y y y y
u y y y y y y y
2 3 2 2 2 3 1 2 1 2 2 2 2 2 1 2 1 1 2 2 2 1 1 2 1 2 0 2
1 3 2 1 2 3 1 1 1 2 2 1 2 2 1 1 1 1 2 1 2 1 1 1 1 1 0 1
+ + + + + + +
+ + + + + + +



We might be interested in testing the following


hypotheses, and their implied restrictions on the
parameter matrices:

Each of these four joint hypotheses can be tested within


the F-test framework, since each set of restrictions
contains only parameters drawn from one equation.

These tests could also be referred to as Granger causality


tests.
Hypothesis Implied Restriction
1. Lags of y
1t
do not explain current y
2t
21
= 0 and
21
= 0 and
21
= 0
2. Lags of y
1t
do not explain current y
1t
11
= 0 and
11
= 0 and
11
= 0
3. Lags of y
2t
do not explain current y
1t
12
= 0 and
12
= 0 and
12
= 0
4. Lags of y
2t
do not explain current y
2t
22
= 0 and
22
= 0 and
22
= 0

Granger causality tests seek to answer


questions such as Do changes in y
1
cause
changes in y
2
? If y
1
causes y
2
, lags of y
1

should be significant in the equation for y
2
. If
this is the case, we say that y
1
Granger-
causes y
2
.

If y
2
causes y
1
, lags of y
2
should be significant
in the equation for y
1
.

If both sets of lags are significant, there is


bi-directional causality

A bivariate VAR:
Granger-causality means that:
x Granger-causes y if
y Granger-causes x if
Or, Granger-causality means that:
x Granger-causes y if
y Granger-causes x if
Testing for Granger causality
1 1 1 11 12
1 2 2 21 22
( ) ( )
( ) ( )
t t t
t t t
x x c L L
y y c L L

1 1 1 1 1
+ +
1 1 1 1 1

] ] ] ] ]
21
( ) 0 L
12
( ) 0 L
12
( ) 0 L
21
( ) 0 L
1 1 11 12
2 2 21 22
( ) ( )
( ) ( )
t t
t t
x L L
y L L


1 1 1 1
+
1 1 1 1

] ] ] ]

Approach 1: Test the null hypothesis in the


regression:
rejection of the null is taken as evidence that y Granger-causes
x. One can use an F-test (Wald test) it has better small
sample properties. Alternatively, one could use a likelihood
ratio test, which is
2
distributed.

Testing for Granger causality
1 1 1
( ) ...
t t t p t p t
x c L x y y

+ + + + +
0 1
: ...
p
H

Approach 2: Use a regression by truncating the


infinite lagged polynomials and making sure the residuals
are uncorrelated; alternatively, produce corrected
(heteroskedasticity and autocorrelation consistent) standard
errors. One way to do it with the auxiliary regression,
Choose p such that v
t
are

white noise k is arbitrarily chosen.
Test the null hypothesis .
Rejection of this null is taken as evidence that y Granger-
causes x (no, there is no typo here!)
Testing for Granger causality
1 0 1
p
k k
t j t j j t j j t j t
j j j
y c h y b x d x v
+

+ + + +

0 1
: ... 0
k
H d d
Testing for Granger causality

Approach 1: Test the null hypothesis


in the

regression:

rejection of the null is taken as evidence


that y Granger-causes
x. One can use an F-test (Wald test) it
has better small
sample properties. Alternatively, one could
use a likelihood
ratio test, which is 2 distributed.

References: Hamilton, pp. 306-309.

y Granger-causes x does not mean that there


is an economic generating mechanism such
that future values of x are caused by y.
Granger-causality is a statement about the
predictive ability of y in forecasting x.

Omitted variables (such as examining


bivariate Granger-causality in an n-
dimensional VAR) can lead to detecting
spurious causal relations.

VAR models are often difficult to interpret: one solution is to


construct the impulse responses and variance
decompositions.

Impulse responses trace out the responsiveness of the


dependent variables in the VAR to shocks to the error
term. A unit shock is applied to each variable and its effects
are noted.

Consider for example a simple bivariate VAR(1):

A change in u
1t
will immediately change y
1
. It will change y
2

and also y
1
during the next period.

We can examine how long and to what degree a shock to a


given equation has on all of the variables in the system.
y y y u
y y y u
t t t t
t t t t
1 10 11 1 1 11 2 1 1
2 20 21 2 1 21 1 1 2
+ + +
+ + +




Impul se Responses and Vari ance
Decomposi ti ons: The Orderi ng of
the Vari abl es

But for calculating impulse responses and variance


decompositions, the ordering of the variables is
important.

The main reason for this is that above, we assumed


that the VAR error terms were statistically
independent of one another.

This is generally not true, however. The error terms


will typically be correlated to some degree.

Therefore, the notion of examining the effect of the


innovations separately has little meaning, since they
have a common component.
Impul se Responses and Vari ance
Decomposi ti ons: The Orderi ng of
the Vari abl es

What is done is to orthogonalize the


innovations.

In the bivariate VAR, this problem would be


approached by attributing all of the effect of
the common component to the first of the
two variables in the VAR.

In the general case where there are more


variables, the situation is more complex but
the interpretation is the same.
Vector Autoregressi on Theory
(VAR) Esti mati ng a VAR i n E-vi ew
i . Fi l e/new/workfi l e
i i . Fi l e/i mport/Read Excel /..IP
i i i . Qui ck/Esti mate VAR
i v. Lag i nterval s: 1 2 tel l s E-vi ews to use
the fi rst and second l ags of al l of the
vari abl es i n the system as ri ght-hand
si de vari abl es.

Select Menu Options;


File/Open/Workfile

Define the variables

File/New/Program

series inms=log(ms)

series lnRGDP=log(RGDP)

series dinrdgp=lnrgdp-lnrgdp(-1)

series dlnms=lnms-lnms(-1)
Test the Stationarity property

Stationarity test is done to decide on


VAR model in level or first difference.

Some econometricians have argued


that the debate on stationary,
nonststionary variables is mostly
irrelevant for VAR modeling and that
one is allowed to use a level VAR.
VAR ESTIMATION

Select the series you wish to analyze

dlnms, dlnrgdp

Press CTRL and left click the variable


with your mouse

Select Group window Procs/Make Vector


Autoregression

Select Unrestricted VAR, sample 1960


2008 the estimation will automatically
adjust the sample period for missing
observations
Lag Length selection Criteria

Select VAR window View/Lag length


criteria Max lags 12

You will find the model selection criteria


log- likelihood, LR, FPE, AIC, SIC, HQ

Decide the optimal number of lag

By using the AIC and SIC criteria with


the least value from our result it seems
that the lag length is 1
Impulse Response Function

A shock to the i-th variable not only


directly affects the i-th variable but is
also transmitted to all of the other
endogenous variable through the
dynamic (lag) structure of the VAR.

An impulse response function traces


the effect of a one standard deviation
shock to one of the innovations on
current and future values of the
endogenous variables.
Impulse Response Function

If the innovations
t
are
contemporaneously uncorrelated,
interpretation of the impulse response
is straightforward.

The i-th innovation


i,t
is simply a
shock to the i-th endogenous variable
y
i,t
.
Impulse Response Function in VAR

Select VAR window Impulse or


(View/impulse response)
Impulse Response Function

Under Impulse Definition select Multiple


Graphs, Response Standard Errors
Monte Carlos, and Period 10 or more
periods

For stationary VARs, the impulse responses


should die out to zero and the accumulated
responses should asymptote to some (non-zero)
constant.
Vector Autoregression Theory
(VAR)
3. Working with a VAR
B. Vari ance Decomposi ti on:

While impulse response functions trace the effects of a shock to one


endogenous variable on to the other variables in the VAR, variance
decomposition decomposes variation in an endogenous variable into
the component shocks to the endogenous variables in the VAR. To
obtain the variance decomposition, we can select following:
1) View/Variance decomposition
2) Option: Table, Multiple graphs, Combined response graphs.

The source of this forecast error is the variation in the current and
future values of the innovations to each endogenous variable in the
VAR. The percentage of the forecast variance due to each innovation,
with each row adds up to 100.
Vector Autoregression Theory (VAR)
Granger Causality Tests

We can test Granger causality by running a VAR on the


system of equations and testing for zero restrictions on
the VAR coefficients.

The Granger (1969) approach to the question of


whether x causes y is to see how much of the current y
can be explained by past values of y and to see
whether adding lagged values of x can improve the
explanation.

The y is said to be Granger-caused by x if x helps in the


prediction of y, or equivalently if the coefficients on the
lagged xs are statistically significant. Note that the
two-way causation is frequently the cases; x Granger
causes y and y Granger causes x.
Vector Autoregression Theory (VAR)
Granger Causality Tests

E-vi ew Exampl e:
1) Qui ck/Group Stati sti cs/Granger Causal i ty
2) Li st of seri es: ms GDP
3) Lag: 2 (You may choose other l ags)

The hypothesi s that past Ms does not affect future GDP


i s not rej ected.

The hypothesi s that past GDP does not affect future Ms i s


not rej ected.

If you want to run Granger causality tests with other exogenous


variables (e.g. seasonal dummy variables or linear trends) or if
you want to carry out likelihood ratio (LR) tests, run the test
regressions directly using equation objects.

Вам также может понравиться