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

WORKI NG PAPER S ERI ES

NO 1409 / DECEMBER 2011


by John Geweke
and Gianni Amisano
ANALYSIS OF
VARIANCE FOR
BAYESIAN
INFERENCE
1 Support from Australian Research Council grant 110104732 is gratefully acknowledged.
2 University of Technology Sydney, P.O. Box 123, Broadway, NSW 2007, Australia,
Erasmus University, Netherlands and University of Colorado, USA;
e-mail: John.Geweke@uts.edu.au
3 European Central Bank, Kaiserstrasse 29, 60311 Frankfurt am Main,
Germany; e-mail: gianni.amisano@ecb.europa.eu
This paper can be downloaded without charge from http://www.ecb.europa.eu or from the Social Science
Research Network electronic library at http://ssrn.com/abstract_id=1969437.
NOTE: This Working Paper should not be reported as representing
the views of the European Central Bank (ECB).
The views expressed are those of the authors
and do not necessarily reflect those of the ECB.
WORKI NG PAPER S ERI ES
NO 1409 / DECEMBER 2011
ANALYSIS OF VARIANCE
FOR BAYESIAN INFERENCE
1
by John Geweke
2

and Gianni Amisano
3
In 2011 all ECB
publications
feature a motif
taken from
the 100 banknote.
European Central Bank, 2011
Address
Kaiserstrasse 29
60311 Frankfurt am Main, Germany
Postal address
Postfach 16 03 19
60066 Frankfurt am Main, Germany
Telephone
+49 69 1344 0
Internet
http://www.ecb.europa.eu
Fax
+49 69 1344 6000
All rights reserved.
Any reproduction, publication and
reprint in the form of a different
publication, whether printed or produced
electronically, in whole or in part, is
permitted only with the explicit written
authorisation of the ECB or the authors.
Information on all of the papers published
in the ECB Working Paper Series can be
found on the ECBs website, http://www.
ecb.europa.eu/pub/scientific/wps/date/
html/index.en.html
ISSN 1725-2806 (online)
3
ECB
Working Paper Series No 1409
December 2011
Abstract 4
Non-technical summary 5
1 Introduction 6
2 Population 7
3 Simulation 10
4 Application to Bayesian inference 13
4.1 Extrinsic and intrinsic variance 13
4.2 Decomposition of intrinsic variance 14
4.3 Decomposition of extrinsic variance 15
5 An illustration 17
6 Conclusion 20
References 21
Appendix 22
CONTENTS
4
ECB
Working Paper Series No 1409
December 2011
Abstract
This paper develops a multi-way analysis of variance for non-Gaussian multivariate
distributions and provides a practical simulation algorithm to estimate the
corresponding components of variance. It specifically addresses variance in
Bayesian predictive distributions, showing that it may be decomposed into the sum of
extrinsic variance, arising from posterior uncertainty about parameters, and intrinsic
variance, which would exist even if parameters were known. Depending on the
application at hand, further decomposition of extrinsic or intrinsic variance
(or both) may be useful. The paper shows how to produce simulation-consistent
estimates of all of these components, and the method demands little additional effort
or computing time beyond that already invested in the posterior simulator. It
illustrates the methods using a dynamic stochastic general equilibrium model of the
US economy, both before and during the global financial crisis.

Keywords: analysis of variance, Bayesian inference, predictive distributions,
posterior simulation
JEL codes: C11, C53




5
ECB
Working Paper Series No 1409
December 2011
Non-technical summary
This paper follows the Bayesian paradigm of integrating information. In this context it
provides a new decomposition of variance for predictive distributions. Here are some
of the questions that motivate this research.
1. In prediction and other decision-making situations, econometricians sometimes
replace parameters with point estimates rather than using full posterior or predictive
distributions. This eliminates the contribution of parameter uncertainty to the
distribution relevant to the decision at hand. The impact could be anywhere from an
academic footnote to a disastrous outcome in the real world. Can Bayesian analysis
provide systematic guidance on this point?
2. Understanding complex interactions in large models and their impact on predictive
distributions relevant for decision-making is an essential component in the
improvement of decision support. Are there tools that Bayesians could employ on a
regular basis to identify links between model components and features of predictive
distributions?
3. Emphasis on economic prediction over longer horizons has never been greater,
due to pressing problems such as structural financial problems in many countries. In
models that draw on historical time series, predictions naturally tend to be driven
more by actual behaviour in the near term and more by aspects of model
specification in the longer term. Can the structure of the impact of alternative
information sources be decomposed systematically over a prediction horizon?
We believe that the answers to all three of these, and similar, questions are yes,.and
this paper provides additions to the Bayesian econometricians set of tools to address
such questions. The basic approach is to use the law of total variance iteratively to
identify multiple sources of variance.
In the paper we take up details pertinent to Bayesian analysis, making two specific
contributions. The .first is the decomposition of the predictive distribution into
extrinsic variance, i.e. due to parameter uncertainty, and intrinsic variance, which
would exist even if parameters were known.
The second contribution is to show that given a posterior simulator, very little
additional effort or computing time is required to produce simulation-consistent
estimates of these variance components.
The paper concludes with an illustrative application of the techniques developed in
the paper, to predictive distributions from a widely used dynamic stochastic general
equilibrium (DSGE) model just before and then during the recent financial crisis in the
U.S. This illustration shows, among other things, that the understatement of
predictive variance inherent in replacing parameters with known values is
systematically greater in volatile than quiescent times.
6
ECB
Working Paper Series No 1409
December 2011
1 Introduction
Bayesian inference is a remarkable intellectual tool that can integrate information from
widely dierent sources and draw out its implications for specic decisions under con-
sideration. That many economists recognize this fact is due in no small part to the
work and unrelenting eorts of Arnold Zellner over his long and rich career. While these
activities took many forms, three of the most important were his 1971 book Bayesian
Inference in Econometrics (Zellner, 1971), the Seminar on Bayesian Inference in Econo-
metrics and Statistics that convened regularly in the following quarter-century, and the
International Society for Bayesian Analysis which he was instrumental in founding in
the early 1990s.
This paper follows the Bayesian paradigm of integrating information. In this context
it provides a new decomposition of variance for predictive distributions. Here are some
of the questions that motivate this research.
1. In prediction and other decision-making situations, econometricians sometimes re-
place parameters with point estimates rather than using full posterior or predictive
distributions. This eliminates the contribution of parameter uncertainty to the dis-
tribution relevant to the decision at hand. The impact could be anywhere from
an academic footnote to a disastrous outcome in the real world. Can Bayesian
analysis provide systematic guidance on this point?
2. Understanding complex interactions in large models and their impact on predic-
tive distributions relevant for decision-making is an essential component in the
improvement of decision support. Are there tools that Bayesians could employ
on a regular basis to identify links between model components and features of
predictive distributions?
3. Emphasis on economic prediction over longer horizons has never been greater, due
to pressing problems including climate change, aging population and structural -
nancial problems in many countries. In models that draw on historical time series,
predictions naturally tend to be driven more by actual behavior in the near term
and more by aspects of model specication in the longer term. Can the structure of
the impact of alternative information sources be decomposed systematically over
a prediction horizon?
We believe that the answers to all three of these, and similar, questions are yes, and
this paper provides additions to the Bayesian econometricians set of tools to address
such questions. The basic approach is to use the law of total variance iteratively to
identify multiple sources of variance, and these ideas are developed in Section 2. If the
relevant statistical structure of information and the problem at hand is Gaussian this
amounts to no more than analysis of variance with multiple factors, well understood for
a century and standard training in statistics. But contemporary econometric models
7
ECB
Working Paper Series No 1409
December 2011
aio funoamonlally nonlinoai, ano oui appioach accounls foi lhal. 1o lho Losl of oui
knowloogo, lhis is a now conliiLulion.
1his oocomposilion is a foaluio of lho populalion. Simulalions fiom lho populalion
piovioo oslimalos of lho oocomposilion. Soclion 8 lays oul lho oolails, ano shows lhal
lho oslimalos aio simulalion consislonl: i.o., lhoy convoigo almosl suioly lo populalion
counloipails as lho sizo of lho simulalion samplo incioasos.
Soclion 4 lakos up oolails poilinonl lo Layosian analysis, making lwo spocilc conlii-
Lulions. 1ho lisl is lho oocomposilion of lho piooiclivo oisliiLulion: lisl, inlo oxliinsic
vaiianco, lhal which is ouo lo paiamoloi uncoilainly, ano inliinsic vaiianco, which woulo
oxisl ovon if paiamolois woio known; ano, socono, lho fuilhoi oocomposilion of oxliin-
sic ano inliinsic vaiianco, oilhoi (oi Lolh) of which may Lo iolovanl ooponoing on lho
applicalion al hano. 1ho socono conliiLulion in lhis soclion is lo show lhal givon a pos-
loiioi simulaloi, voiy lilllo aooilional oloil oi compuling limo is ioquiioo lo pioouco
simulalion-consislonl oslimalos of lhoso vaiianco compononls.
1ho papoi concluoos wilh an illuslialivo applicalion of lho lochniquos oovolopoo in
lho papoi, lo piooiclivo oisliiLulions fiom a wiooly usoo oynamic slochaslic gonoial
oquiliLiium moool jusl Lofoio ano lhon ouiing lho ioconl lnancial ciisis in lho U.S. 1his
illuslialion shows, among olhoi lhings, lhal lho unooislalomonl of piooiclivo vaiianco
inhoionl in ioplacing paiamolois wilh known valuos is syslomalically gioaloi in volalilo
lhan quiosconl limos. Wo Loliovo lhal lhis lnoing iolocls a gonoial piinciplo lhal shoulo
omoigo in olhoi applicalions as woll.
1ho iooas in lhis papoi havo moio lhan ono inlolloclual hoiilago. Fiom lho Layosian
poispoclivo of Soclion 4, which molivalos lho woik, lho oocomposilion of piooiclivo
vaiianco inlo oxliinsic ano inliinsic compononls is a naluial oulgiowlh of piioi ano
posloiioi piooiclivo analysis, which can Lo liacoo lo Gooo (106), IoLoils (106) ano
Lox (1080) ano is fully oosciiLoo Ly Lancasloi (2004), Soclions 2.4-2., ano Gowoko
(200), Soclion 8.8. An immooialo piocuisoi of lho woik in Soclion 4 is lho iooa of
piioi piooiclivo analysis of vaiianco monlionoo in passing in Gowoko (2010), Soclion
4.2.8. Fiom lho oisliiLulion lhooiy poispoclivo of Soclion 2, all of lho oocomposilions of
vaiianco hoio aio iopoaloo applicalions of lho law of lolal vaiianco, which is slaloo al lho
slail of lhal soclion. Viilually all of lho applicalions of lhis iooa in liaoilional analysis
of vaiianco havo Loon in lho conloxl of linoai (Gaussian) moools, ano lhal lioalmonl is
insumcionl foi lho gonoial caso as woll as foi lho applicalion of lho law of lolal vaiianco
in lho conloxl of posloiioi oisliiLulions. Wo aio nol awaio of oxposilions of lhoso iooas
al lhis lovol of gonoialily, oi oxploilalion of lho mooilcalion of simulalion wilh Lalancoo
oosign ano mulli-facloi analysis wilh no inloiaclions lo accoss lhoso oocomposilions of
vaiianco as oovolopoo in Soclion 8.
Lol l Lo a ianoom vocloi oolnoo in lho usual way, paililionoo as l

= (1

. 2

), whoio
1 ano 2 aio voclois. 1ho following iosull is woll known (o.g. Woiss, 200, pp 88-886).
2 Population
8
ECB
Working Paper Series No 1409
December 2011
IroosItIon 1 ;1n& J Jn| 1n:.nn) 5& hn l

= (1

. 2

) . nn (1. c)-n|&J
:nnJn : J]nJ n n :hnh.|.j n (!. T. 1), nnJ hn var (l) r.. Jhn
var (1 ) = L
Z
[var (1 [2)[ var
Z
[L(1 [2)[ . (1)
1ho noxl lhioo iosulls aio conlingonl on:
CondItIon 1 \ = (\

. 1

. 2

. nn (1. c)-n|&J :nnJn : J]nJ n n :hn-


h.|.j n (!. T. 1) nnJ var (\ ) r..
1ho following lwo oxlonsions of Iioposilion 1 aio immooialo.
IroosItIon 2 G.n nJ..n 1, Jn hj nnj .n .n h &: J h nn:j.nn|
J.:.h&.n J \. Jhn
var (1 [ \ = ) = L
Z
[var (1 [2. \ = )[ var
Z
[L(1 [2. \ = )[ . (2)
IrooI. In Iioposilion 1 ioplaco lho oisliiLulion of l wilh lho oisliiLulion of \ conoi-
lional on \ = .
IroosItIon 3 G.n nJ..n 1,
L
W
[var (1 [ \)[ = L
W,Z
[var (1 [ \. 2)[ L
W
var
Z
[L(1 [ \. 2)[ . (8)
IrooI. Inlogialing Lolh sioos of (2) wilh iospocl lo lho moasuio d1
W
yiolos lho iosull.
Iioposilion 8 loaos oiioclly lo lho following iosull, which in luin piovioos lho foun-
oalion foi lho iosl of lho molhoos oiscussoo in lhis papoi.
IroosItIon 4 G.n nJ..n 1,
var (1 ) = L
W,Z
[var (1 [ \. 2)[ L
Z
var
W
[L(1 [ \. 2)[ var
Z
[L(1 [ 2)[ . (4)
IrooI. In (8) iovoiso lho iolos of \ ano 2 lo wiilo
L
Z
[var (1 [ 2)[ = L
W,Z
[var (1 [ \. 2)[ L
Z
var
W
[L(1 [ \. 2)[ . ()
1hon suLslilulo () in (1) lo oLlain (4).
Noxl, supposo:
CondItIon 2 A . nn (1. c)-n|&J :nnJn : J]nJ n n :hnh.|.j n (!. T. 1)
nnJ var (A) r..
9
ECB
Working Paper Series No 1409
December 2011
Lol A Lo paililionoo
A

= (A

. . . . . A

a
) . (6)
Foi : = 2, laking 1 = A

ano 2 = A

in (1) loaos lo
var (A

) = L
A

[var (A

[A

)[ var
A

[L(A

[A

)[ (7)
Foi lho caso : = 3, laking 1 = A

, \ = A

ano 2 = A

in (4) yiolos
var (A

) = L
A

,A

[var (A

[ A

. A

)[ L
A

var
A

[L(A

[ A

. A

)[
var
A

[L(A

[ A

)[ . (8)
Now apply Iioposilion 8 lo lho loaoing loim of (8), wilh 1 = A

, \ = (A

. A

)
ano 2 = A

, lo oLlain
var (A

) = L
A

,A

,A

[var (A

[ A

. A

. A

)[
L
A

,A

var
A

[L(A

[ A

. A

. A

)[
L
A

var
A

[L(A

[ A

. A

)[ var
A

[L(A

[ A

)[ . (0)
1his piocoouio can Lo iloialoo, as follows.
IroosItIon 5 G.n nJ..n . nnJ h n:..n ;),
var (A

) = L
A

,...,A

[var (A

[ A

. . . . . A
a
)[
L
A

,...,A

var
A

[L(A

[ A

. . . . . A
a
)[
. . . L
A

,...,A

_
var
A

[L(A

[ A

. . . . . A
)
)[
_
. . . L
A

var
A

[L(A

[ A

. A

)[ var
A

[L(A

[ A

)[ .
= L
A

,...,A

[var (A

[ A

. . . . . A
a
)[ (10)

)
L
A

,...,A

_
var
A

[L(A

[ A

. . . . . A
)
)[
_
. (11)
IrooI. 1ho caso : = 4 is (0). Apply Iioposilion 8 lo lho loaoing loim (10), wilh
\ = (A

. . . . . A
a
), 2 = A
a
ano 1 = A

. 1his loaos lo lho suLslilulion


L
A

,...,A

[var (A

[ A

. . . . . A
a
)[
L
A

,...,A

_
var
A

[L(A

[ A

. . . . . A
a
) [ A

. . . . . A
a
[
_
.
foi (10). Ly inouclion, lho pioposilion is liuo.
1ho foiogoing iosulls aio quilo gonoial, ooponoing only on Conoilions 1 ano 2. In
lho spocial caso lhal 1 in Conoilion 2 is Gaussian, wo havo
r

= o
a

)
,
)
r
)

10
ECB
Working Paper Series No 1409
December 2011
where is independent of (r
2
. . . . . r
n
), E(r
1
j r
2
. . . . . r
n
) = o +

n
j=2
,
j
r
j
, E() =
E( j r
2
. . . . . r
n
) = 0, and var () = var (r
1
j r
2
. . . . . r
n
). Let
j
j
= r
j
E(r
j
j r
1
. . . . . r
j1
) (, = 2. . . . . :) .
Then there is a one-to-one linear transformation between (r
2
. . . . . r
j
) and
_
j
2
. . . . . j
j
_
.
In particular,
r
1
=
n

j=2
c
j
j
j
+ ,
where c
j
= co
_
r
1
. j
j
_
,var
_
j
j
_
and var (r
1
) =

n
j=2
c
2
j
var
_
j
j
_
+ var (). Moreover,
E(r
1
j r
2
. . . . . r
j+1
) = E(r
1
) +
j+1

i=1
c
i
j
i
and
var
x
j+1
[E(r
1
j r
2
. . . . . r
j+1
) j r
2
. . . . . r
j
]
= var
x
j+1
_
j+1

i=2
c
i
j
i
j j
2
. . . . . j
j
_
= c
2
j+1
var
_
j
j+1
_
.
None of these terms involve r
j
or j
j
, because in the Gaussian distribution conditional
variances do not depend on the values of the variables conditioned upon.
Thus the leading term (10) in Proposition 5 reduces to var () in the Gaussian case,
and term , in the sum (11) is c
2
j+1
var
_
j
j+1
_
. Were we to divide the equation in Propo-
sition 5 by var (r
1
), then (10) would be 1 1
2
, where 1
2
is the coecient of multiple
correlation between r
1
and (r
2
. . . . . r
n
); the term , in (11) would be the increment to
population 1
2
when r
j+1
is introduced into the set of regressors that already contains
r
1
. . . . . r
j
.
3 Simulation
All of these population decompositions have analogs in simulation. This is important for
the Bayesian applications that motivate this work. What follows takes the components
A
1
. . . . . A
n
to be scalars. The vector case exactly parallels the scalar case but entails
more awkward and space-consuming notation.
Suppose that it is feasible to simulate
r
(m)
j
s j (r
j
j r
2
. . . . . r
j1
) (: = 1. 2. . . . ; , = 2. . . . . :) , (12)
where the case , = 2 is unconditional simulation, as well as
r
(m)
1
s j (r
1
j r
2
. . . . . r
n
) (: = 1. 2. . . .) . (13)
11
ECB
Working Paper Series No 1409
December 2011
Wo shall supposo lhal lho ianoom soquoncos
_
r
n
)
_
aio oigooic. 1hon lhoio aio simu-
lalions lhal paiallol lho oocomposilions in lho piovious soclion, which piovioo molhoo
of momonls oslimalos of lho loims in lho populalion oocomposilion givon in Iioposilion
.
Foi lho simplosl caso : = 2, lhis involvos simulaling r
n

(:

= 1. . . . . `

), ano
conoilional on oach r
n

simulaling r
n

,n

(:

= 1. . . . . `

) fiom lho oisliiLulion of


r

conoilional on r
n

. Donolo
r
n

= `

r
n

,n

ano r

= `

r
n

= (`

r
n

,n

.
1hon
(`

_
r
n

,n

= (`

_
r
n

,n

r
n

_
r
n

. (14)
1ho loims in lhis iolalionship conslilulo consislonl oslimalos of lho loims of lho oqua-
lion in Iioposilion foi lho caso : = 2, oquivalonlly foi lho loims of lho oqualion in
Iioposilion 1 wilh 1 = r

ano 2 = r

.
Whon lho oisliiLulion of (r

. r

) is Gaussian, oi moio gonoially whon lho oisliiLulion


of r

[ r

is conoilionally homoscooaslic, wo nooo only a singlo simulalion


_
r
n

. r
n

_
fiom lho joinl oisliiLulion of r

ano r

lo consislonlly oslimalo lho loims in lho oocom-


posilion. 1ho facl lhal in lho moio gonoial caso lho conoilional vaiianco of r

ooponos
in a nonliivial way on lho valuo of r

nocossilalos lho oouLlo simulalion in :

ano :

.
Noxl consiooi lho caso : = 3. 1his caso luins oul lo Lo signilcanl, Locauso lho
calculalions hoio aio ossonlially lhoso lhal aio ioquiioo foi lho gonoial caso. Coiio-
sponoing lo oach simulalion r
n

(:

= 1. . . . . `

) fiom lho unconoilional oisliiLulion


of r

lhoio aio simulalions r


n

(:

= 1. . . . . `

) fiom lho oisliiLulion of r

conoi-
lional on r
n

. 1hon coiiosponoing lo oach simulalion r


n

,n

lhoio aio simulalions


r
n

,n

,n

(:

= 1. . . . . `

) fiom lho oisliiLulion of r

conoilional on
_
r
n

,n

. r
n

_
.
Coiiosponoing lo lhoso simulalions oolno lho (conoilional) samplo moans
r
n

,n

= `

r
n

,n

,n

(:

= 1. . . . . `

: :

= 1 . . . . `

) ,
r
n

= `

r
n

,n

(:

= 1. . . . . `

) ,
r

= `

r
n

.
12
ECB
Working Paper Series No 1409
December 2011
1hoso aio simulalion-consislonl appioximalions of L
_
r

[ r
n

. r
n

,n

_
, L
_
r

[ r
n

_
ano L(r

), iospoclivoly. Ly simulalion-consislonl" wo iofoi lo almosl suio limils as


`
)
(, = 1. 2. 3). Iolalivo ialos of oivoigonco of lho loims `
)
oo nol malloi.
1ho simulalion-consislonl molhoo of momonls appioximalion of var (r

), lho lofl sioo


of (8), is
(`

_
r
n

,n

,n

r
_

. (1)
Coiiosponoing lo lho lhioo loims on lho iighl sioo of (8), lho simulalion-consislonl
appioximalion of L
A

,A

[var (A

[ A

. A

)[ is
(`

_
`

_
r
n

,n

,n

r
n

,n

_
; (16)
lho simulalion-consislonl appioximalion of L
A

var
A

[L(A

[ A

. A

)[ is
`

_
`

_
r
n

,n

r
n

_
; (17)
ano lho simulalion consislonl appioximalion of var
A

[L(A

[ A

)[ is
`

_
r
n

. (18)
Consislonl wilh lho ioonlily in (8), lho sum of (16) (18) is (1). 1ho compulalions
(16)-(18) aio implomonloo wilh lhioo linos of cooo in lho MallaL funclion pioviooo in lho
Apponoix of lhis papoi. 1aking `

= `

= `

= 100 is aooqualo in oui oxpoiionco, as


inoicaloo Ly lho lnoing lhal compulalions slailing wilh oiloionl sooos of lho ianoom
numLoi gonoialoi pioouco quilo similai iosulls. Lvon in lho caso in which r

is ioplacoo
Ly a vocloi of mooosl sizo (o.g., 10 oi 12 compononls) lho compulalions ioquiio woll
unooi ono socono.
1his piocoss coulo Lo iloialoo lo lho gonoial caso of Iioposilion 2. 1ho oulcomo
woulo Lo a simulalion samplo iooally suiloo lo mulli-facloi analysis of vaiianco wilh a
Lalancoo oosign, Lul lho simulalion ioquiiomonls aio ovoiwholming o.g. lho numLoi of
simulalions ioquiioo is
_
`
a
`

_
, (` 1) in lho caso whoio `

= . . . . `
a
= `.
1his is impiaclical foi : much laigoi lhan 3 ano ` sumcionlly laigo lo piovioo ioliaLlo
appioximalions. Insloao consiooi loim , of (11),
L
A

,...,A

_
var
A

[L(A

[ A

. . . . . A
)
)[
_
ano nolo lhal wo can uso lho appioach in lho piovious paiagiaph, ioplacing r

wilh
(r

. . . . . r
)
) ano r

wilh r
)
. 1ho ioquisilo simulalions aio all possiLlo Ly viiluo of lho
assumplion lhal simulalions aio possiLlo fiom lho oisliiLulions (12) (18), maoo al
Loginning of lhis soclion. In lho caso `

= . . . . `
a
= `, lhis onlails :`

simulalions,
a numLoi lhal is linoai in : ano is ioasonaLlo in lho applicalions lhal molivalo lhis
woik.
13
ECB
Working Paper Series No 1409
December 2011
4 Application to Bayesian inference
These decompositions are useful tools in the interpretation of posterior distributions
that are accessed by means of simulation, as is the case in most Bayesian work. Let
Y
T
= [y
1
. . . . . y
T
] denote the observables (random ex ante) where 1 is the size of the
sample, Y
o
T
their observed values (xed ex post), the model,
A
2
A
the para-
meter vector, j (
A
j ) the prior density, and j (Y
T
j
A
. ) the distribution of ob-
servables conditional on the parameters. The posterior density of the parameters is
j (
A
j Y
o
T
. ) / j (
A
j ) j (Y
o
T
j
A
. ), and we assume that a posterior simulator is
available that generates an identically distributed ergodic process
(m)
A
s j (
A
j Y
o
T
. )
(: = 1. 2. 3. . . .). For importance sampling, there are obvious modications to the com-
putation of simulation moments involving the weighting function, and these will also be
consistent if the usual regularity conditions (Geweke, 2005, Theorem 4.2.2) are satised.
From a formal perspective, Bayesian inference is always undertaken to inform a policy
decision. Let ! denote the random vector pertinent to the loss function 1(!) governing
the decision: e.g., for a central bank, ! could consist of measures of output and ination
in some future quarters; for a retailer, ! could be sales of specied products in specied
markets; for a government agency seeking to adjust census count, ! might contain
measures of characteristics of the actual population; in a pure prediction problem !
consists of future values (y
T+1
. . . . . y
T+H
) over a specied horizon H. The model informs
the policy decision if and only if it species the conditional distribution j (! j Y
T
.
A
. ),
and we assume that is the case. This conditional distribution could be degenerate: for
example, if the decision involves testing the hypothesis
A
2
A1
then . = 1

A1
(
A1
).
Simulation from j (! j Y
o
T
.
A
. ) is generally straightforward and less demanding than
simulating from the posterior distribution. In many of these specic instances, expected
loss conditions on the prospective action taken by the decision-maker. For our purposes
one of a number of alternative actions is then subsumed in .
4.1 Extrinsic and intrinsic variance
The distribution relevant for decision-making conditions on the model and data Y
o
T
,
j (! j Y
o
T
. ) /
_

A
j (
A
j Y
o
T
. ) j (! j Y
o
T
.
A
. ) d
A
.
Given a posterior sample
(m
2
)
A
(:
2
= 1. . . . . `
2
), this distribution can be accessed by
means of auxiliary simulations from the model for !.
!
(m
1
;m
2
)
s j
_
! j Y
o
T
.
(m
2
)
A
.
_
(:
1
= 1. . . . . `
1
) .
The corresponding sample moments of !, and in particular the approximation
(`
1
`
2
)
1
M
1

m
1
=1
M
2

m
2
=1
1
_
!
(m
1
;m
2
)
_
14
ECB
Working Paper Series No 1409
December 2011
of E[1(!) j Y
o
T
. ] are simulation-consistent if and only if `
2
! 1; it is not necessary
that `
1
increase at all, for this purpose, and indeed `
1
= 1 is sucient.
From (7) with A
1
= ! and A
2
=
A
, and recognizing that the relevant distribution
conditions on the data Y
o
T
and the model specication ,
var (! j Y
o
T
. ) = E

A
[var (! j
A
. Y
o
T
. )] + var

A
[E(! j
A
. Y
T
. )] . (19)
We refer to the rst component on the right-hand side as the intrinsic variance of !:
it is the variation in ! that would exist if one knew the parameter vector
A
, averaged
using the posterior distribution of
A
. We refer to the second component as the extrinsic
variance of !: it is the variance in ! that is due to not knowing
A
. If the distribution
of ! conditional on Y
T
and
A
is degenerate, as is the case with conventional tests
of hypotheses about
A
, then there is no intrinsic variance. If the prior distribution is
dogmatic then there is no extrinsic variance. In most realistic cases both intrinsic and
extrinsic variance are positive.
Making the corresponding substitution in the simulation (14)
(`
1
`
2
)
1
_
!
(m
1
;m
2
)
!
_ _
!
(m
1
;m
2
)
!
_
0
= (`
1
`
2
)
1
M
2

m
2
=1
M
1

m
1
=1
_
!
(m
1
;m
2
)
!
(m
2
)
_ _
!
(m
1
;m
2
)
!
(m
2
)
_
0
(20)
+`
1
1
M
1

m
1
=1
_
!
(m
2
)
!
_ _
!
(m
2
)
!
_
0
(21)
where
!
(m
2
)
= `
1
1
M
1

m
1
=1
!
(m
1
;m
2
)
and ! = `
1
2
M
2

m
2
=1
!
(m
2
)
.
As `
1
! 1 and `
2
! 1 (20) converges to E

A
[var (! j
A
. )] in (19) and (21) to
var

A
[E(! j
A
. Y
T
. )].
4.2 Decomposition of intrinsic variance
Let the vector of interest be partitioned !
0
= (!
0
1
. !
0
2
), and suppose that it is feasible
to simulate
!
(m)
1
s j (!
1
j Y
o
T
.
A
. ) , (22)
!
(m)
2
s j (!
2
j !
1
. Y
o
T
.
A
. ) . (23)
For example in a pure prediction problem we might have !
1
= y
T+1
and !
2
= y
T+2
or !
2
= (1,4)

4
s=1
y
T+s
; or, .
1
could be a monetary policy instrument and !
2
would
consist of the remaining variables in a macroeconomic model. In the notation of the
previous section, take A
1
= !
2
, A
2
=
A
and A
3
= !
1
. Then from the particular case
(8) of Proposition 5,
15
ECB
Working Paper Series No 1409
December 2011
var (!
2
) = E

A
;!
1
[var (!
2
j !
1
.
A
)] (24)
+E

A
fvar
!
1
[E(!
2
j
A
. !
1
)]g (25)
+var

A
[E(!
2
j
A
)] . (26)
All of the moments in this decomposition condition on the data Y
o
T
and model
specication as well as the vectors explicitly indicated; we omit those terms to keep
the expressions from being unduly cluttered. The term (26) is the extrinsic variance
of !
2
, and therefore (24)-(25) provides a decomposition of the intrinsic variance of !
2
.
The bracketed term in (24) is the variance in !
2
that would remain even if one knew
both
A
and !
1
, and (24) averages this with respect to the posterior distribution of

A
and predictive distribution of !
1
. The term in braces in (25) is the variance in !
2
attributable to not knowing !
1
, and (25) averages this with respect to the posterior
distribution of
A
. More loosely speaking, (25) is the portion of intrinsic variance that
is resolved (disappears) once !
1
becomes known. As a specic instance, if 1 is the fourth
quarter of 2011, y
t
is a vector of growth rates, !
1
= y
T+1
and !
2
= (1,4)

4
s=1
y
T+s
,
then (25) is the variance in the annual growth rate for 2012 that will be resolved at the
close of the rst quarter of 2012.
Following the methods of Section 3, it is straightforward to compute a simulation-
consistent approximation of (24)-(26). Conditional on a simulation sample
(m
2
)
A
of size
`
2
from the posterior distribution of
A
, generate `
3
values !
(m
2
;m
3
)
1
from (22) and
then conditional on each of these `
2
`
3
draws generate `
1
values !
(m
1
;m
2
;m
3
)
2
from (23).
Then substituting
(m
2
)
A
for r
(m
2
)
2
, !
(m
2
;m
3
)
1
for r
(m
2
;m
3
)
3
and !
(m
1
;m
2
;m
3
)
2
for r
(m
1
;m
2
;m
3
)
1
,
compute the moments as indicated in (16)-(18).
This process can be iterated For example, continuing with the specic case of pre-
dicting four successive quarters of growth rates, intrinsic variance can be decomposed
into four rather than two components, yielding the variance in the 2012 annual growth
rate that will be resolved following quarters 2 and 3 as well as quarter 1 of 2012.
4.3 Decomposition of extrinsic variance
Let the parameter vector be decomposed
0
A
= (
0
1A
.
0
2A
), and suppose that it is feasible
to simulate

(m)
A1
s j
_

A1
j Y
0
T
.
_
, (27)

(m)
A2
s j
_

A2
j
A1
. Y
0
T
.
_
. (28)
The simulation (27) is from the marginal distribution of
A1
, so these simulations can
be taken as the corresponding subvector of the posterior simulation sequence itself. The
second simulation need not be straightforward or even feasible, though it usually is. If
the posterior simulator is a pure Metropolis algorithm then the same algorithm can be
used in (28), and indeed this simulation should be less challenging due to the diminished
16
ECB
Working Paper Series No 1409
December 2011
oiooi of lho paiamoloi vocloi. If lho posloiioi simulaloi is a GiLLs sampling algoiilhm
ano nono of lho Llocks incluoo compononls of Lolh

ano

lhon a suLsol of lho


conoilional oisliiLulions ioquiioo foi lho full posloiioi simulaloi piovioos (28).
1uining lisl lo lho foimalilios, lako A

= , A

ano A

in (8), which
yiolos
var () = L

[var ( [

)[ (20)
L

var

[L( [

)[ (80)
var

[L( [

)[ . (81)
(1hal all momonls aio also conoilional on
c
T
ano is suppiossoo in lhis nolalion lo
avoio clulloi.) 1ho lisl loim (20) is lho inliinsic vaiianco of . 1ho loims (80)-(81)
oocomposo lho oxliinsic vaiianco of . 1ho lasl loim (81) moasuios syslomalic localion
movomonl in in iosponso lo changos in

, whoio lho iolovanl changos in

aio
lhoso in ils posloiioi oisliiLulion. Sinco Ly oolnilion all oxliinsic vaiianco is accounloo
foi Ly

, (80) assigns lho iomainooi lo

whilo also accounling foi lho facl lhal


lho magniluoo of lho iomainooi may oopono on

ilsolf. If lho joinl oisliiLulion


of

ano woio Gaussian ano lho lasl lwo loims woio oiviooo Ly oxliinsic vaiianco
var

[L( [

)[ lhon (81) woulo piovioo lho 1-squaioo, lho fiaclion of oxliinsic vaii-
anco ouo lo

.
As a spocilc inslanco, supposo a conlial Lank using a oynamic slochaslic gonoial
oquiliLiium(DSGL) moool is inloiosloo in lho oxlonl lo which oxliinsic vaiialion lho ono-
slop-ahoao piooiclivo oisliiLulion j (
T
[
c
T
. ) is oiivon Ly lho sliucluial paiamolois
of lho moool (o.g., lho paiamolois of ulilily, pioouclion ano policy iosponso funclions)
as opposoo lo lhoso oosciiLing lho oynamics of shocks lo oqualions (o.g., lho vaiiancos
ano auloiogiossivo coomcionls). 1ho foiogoing analysis piovioos lwo answois lo lhoso
quoslions, ooponoing on which paiamolois aio casl as

ano which as

.
Il is impoilanl lo koop in mino lhal Ly oolnilion lho paiamolois as a wholo accounl
foi all of lho oxliinsic vaiianco. 1aking

as lho vocloi of sliucluial paiamolois pio-


vioos lho moasuio (81) of lho oxlonl lo which posloiioi vaiialion in sliucluial paiamolois
accounls foi oxliinsic vaiianco, ano laking

as lho shock oynamics paiamolois ooos


lho samo foi lhoso paiamolois. If lho lwo gioups of paiamolois aio inooponoonl in lho
posloiioi oisliiLulion, lhon lho sum of lho lwo moasuios is lho oxliinsic vaiianco. Lul, in
gonoial, lhis will nol Lo lho caso ano il will luin oul lhal lho lwo moasuios sum lo moio
lhan oxliinsic vaiianco. Novoilholoss lho oxoiciso can ioonlify conliasling conliiLulions
of gioups of paiamolois lo oxliinsic vaiianco. 1his amLiguily in alliiLuling oxplainoo
vaiianco uniquoly lo alloinalivo souicos is piocisoly lho samo ono lhal aiisos in linoai
iogiossion, ano is jusl as funoamonlal hoio as in lhal moio olomonlaiy silualion.
17
ECB
Working Paper Series No 1409
December 2011
5 An illustration
We illustrate the methods set forth using the dynamic stochastic general equilibrium
(DSGE) model with price and wage stickiness and monopolistic competition due to
Smets and Wouters (2007). There are seven structural shocks in the model: innovations
in total factor productivity and the risk premium, an investment specic technology
shock, innovations to wage and price mark up, and policy shocks to scal and monetary
policy. See Smets and Wouters (2007) for further detail. The model predicts seven
macroeconomic time series:
1. Consumption (quarterly percentage growth rate in per capita real consumption);
2. Investment (quarterly percentage growth rate in per capita real investment);
3. Output (quarterly percentage growth rate in per capita real GDP);
4. Hours (log per capita weekly hours);
5. Ination (quarterly percentage growth rate growth rate in GDP deator);
6. Real wage (quarterly percentage growth rate growth rate in real wage);
7. Interest rate (Federal Funds Rate on a quarterly basis).
The data used in this illustration begin with the rst quarter of 1951.
With respect to the notation introduced in Section 4 this seven-dimensional time
series constitutes fy
t
g. DSGE modes like the one in Smets and Wouters (2007) are
widely used in central banks. In the most common implementation the one-step-ahead
predictive density is taken to be
j
_
y
T+1
j Y
o
T
.

(T)
A
.
_
, where

(T)
A
= arg max

A
j (
A
j Y
o
T
. ) . (32)
This does not conform with the formal Bayesian rule
j (y
T+1
j Y
o
T
. ) =
_

A
j (y
T+1
j Y
o
T
.
A
. ) j (
A
j Y
o
T
. ) d
A
. (33)
If there were no extrinsic variance in y
T+1
in the predictive density (33) then (32) would
be equivalent to (33). Of course this is not the case, but if extrinsic variance is a small
enough component of predictive variance then the preference for (33) over (32) is an
academic rather than a practical point. That is one of the questions investigated here.
We accessed the posterior density j (
A
j Y
o
T
. ) by means of a conventional Metropo-
lis random walk posterior simulation algorithm to generate the sequence
_

(m
2
)
A
_
de-
scribed in Section 4 by thinning a chain of 10,000 MCMC simulations to `
2
= 100
equally-spaced draws. Our vector of interest is !
0
= (!
0
1
. !
0
2
), with !
1
= y
T+1
and
18
ECB
Working Paper Series No 1409
December 2011

= (1,4)

Tc
. Following lho piocoouios oosciiLoo in lho piovious soclion wo
simulaloo `

= 100 oiaws
n

,n

=
n

,n

T
fiom lho ono-quailoi-ahoao oonsily
j
_

T
[
c
T
.
n

_
conoilional on oach of lhoso 100 paiamoloi oiawings. Slailing
wilh oach of lho 10,000 paiis
_

.
n

,n

_
wo simulaloo in succossion `

= 100
oiawings

,n

,n

Tc
j
_

Tc
[
c
T
.
n

,n

T
. . . . .
n

,n

,n

Tc
.
n

_
(: = 2. 3. 4)
ano lhon foimoo

,n

,n

= (1,4)
_

,n

T

n

,n

,n

T

n

,n

,n

T

n

,n

,n

T
_
. (84)
1ho simulalions of
n

,n

ano
n

,n

,n

ioquiioo jusl unooi ono minulo using MallaL


cooo on a laplop compuloi. 1ho analysis of vaiianco compulalions (8), which pioouco
7 7 vaiianco maliicos, ioquiioo jusl unooi ono-quailoi socono.
Iiooiclivo vaiianco Inliinsic vaiianco
1olal Lxliinsic Inliinsic Duo lo

Iomainooi
Consumplion 0.2840 0.0077 (0.088) 0.2268 (0.067) 0.0706 (0.822) 0.17 (0.688)
Invoslmonl 8.8804 0.0768 (0.028) 8.2681 (0.077) 1.2786 (0.802) 1.084 (0.608)
Oulpul 0.4200 0.0066 (0.016) 0.4148 (0.084) 0.1876 (0.882) 0.2767 (0.668)
Houis 1.0106 0.012 (0.01) 0.004 (0.08) 0.87 (0.6) 0.4417 (0.444)
Inlalion 0.0766 0.0022 (0.020) 0.0744 (0.071) 0.0606 (0.086) 0.0048 (0.064)
Wagos 0.1461 0.0024 (0.016) 0.1488 (0.084) 0.068 (0.48) 0.0770 (0.42)
Foo funos 0.0804 0.0018 (0.014) 0.0881 (0.086) 0.0480 (0.6) 0.0801 (0.444)
1aLlo 1: Docomposilion of piooiclivo vaiianco foi ono-yoai giowlh ialos 2008:1- 2008:4,
Lasoo on lho posloiioi al 2007:4
1ho analysis of vaiianco oocomposos lho piooiclivo vaiianco of giowlh ialos ovoi lho
noxl foui quailois inlo oxliinsic ano inliinsic vaiianco, ano lhon oocomposos inliinsic
vaiianco inlo a compononl lhal is iosolvoo afloi ono quailoi ano lho iomainooi lhal is
nol iosolvoo unlil all foui quailois havo Loon oLsoivoo. Wo unooilook lhis oxoiciso al
lwo ioconl poinls in limo. 1ho lisl is lho ono of 2007:4, using oala lhiough lhal quailoi
ano analyzing lho piooiclivo oisliiLulion foi giowlh ialos ovoi calonoai yoai 2008. 1ho
socono is lho ono of 2000:2, using oala lhiough lhal quailoi ano analyzing lho piooiclivo
oisliiLulion foi giowlh ialos ovoi lho ono-yoai poiioo 2000:8 lhiough 2010:2. 1ho lisl
oxoiciso is posilionoo jusl Lofoio lho onsol of lho gloLal lnancial ciisis: compaioo wilh
hisloiical valuos lhoio was nolhing pailiculaily iomaikaLlo aLoul ioconl quailoily giowlh
ialos. In lho socono oxoiciso ioconl quailoily giowlh ialos oxhiLil valuos Loyono lho
iango soon in lho 60-yoai limo soiios on which lho posloiioi oisliiLulion conoilions.
1aLlo 1 shows lho oocomposilion of vaiianco foi oach of lho sovon soiios in lho
lisl oxoiciso. 1ho main onliios aio lho vaiianco loims oslimaloo fiom lho simulalions.
19
ECB
Working Paper Series No 1409
December 2011
1ho onliios in paionlhosos in columns 8 ano 4 inoicalo lho fiaclional oocomposilion of
vaiianco Lolwoon oxliinsic ano inliinsic vaiianco, whilo lho onliios in paionlhosos in lho
lasl lwo columns inoicalo lho fiaclional oocomposilion of inliinsic vaiianco Lolwoon lho
compononl iosolvoo afloi ono quailoi ano lho iomaining vaiianco. 1aLlo 2 ooos lho
samo lhing foi lho socono oxoiciso.
1ho piooiclivo vaiianco (column 2 in Lolh laLlos) is suLslanlially oiloionl foi lho
sovon limo soiios, Lul lhoso oiloioncos simply iolocl lho unils of moasuiomonl oolailoo
al lho slail of lhis soclion. Lxcopl foi inlalion, piooiclivo vaiianco is moooslly highoi
in lho socono oxoiciso lhan in lho lisl, ano lho samo lhing is liuo of inliinsic vaiianco.
1hoio is a maikoo conliasl in lho allocalion of piooiclivo vaiianco lo oxliinsic vaii-
anco (column 8 in Lolh laLlos) in lho lwo oxoicisos. Lxliinsic vaiianco is novoi moio
lhan 10/ of piooiclivo vaiianco. Howovoi, in lho socono oxoiciso lho fiaclion of piooic-
livo vaiianco lhal is oxliinsic is always much highoi, ianging fiom almosl lhioo limos
as high lo ovoi foui limos as high. 1ho oxplanalion foi lhis conliasl lios in lho val-
uos of ioconl limo soiios in lho lwo oxoicisos. Wilh valuos alypical of lho samplo (lho
socono oxoiciso) uncoilainly aLoul paiamoloi valuos is magniloo in lho piooiclivo ois-
liiLulion: lho impacl of unusually high oi low valuos, which is impoifoclly known, is
moio impoilanl. Ioplacing (88) wilh (82) ooos nol iosull in soiious unooislalomonl of
lho oispoision of lho piooiclivo oisliiLulion al oilhoi limo, Lul lho unooislalomonl is
suLslanlially gioaloi in lho socono caso lhan in lho lisl. 1his lnoing shoulo Lo gonoi-
ally applicaLlo: whon lho oala lhal oiivo lho piooiclivo oisliiLulion havo Loon unusual,
iolalivo lo lho samplo, lho allocalion of piooiclivo vaiianco lo oxliinsic vaiianco will
Lo gioaloi ano using poinl oslimalos in placo of full piooiclivo oisliiLulions will moio
soiiously unooislalo vaiianco in noai-loim piooiclivo oisliiLulions.
1ho allocalion of inliinsic vaiianco of lho ono-yoai foiocasls lo noai-loim ano longoi
loim iolocls lho volalilily inhoionl in lho valuos of lho moool`s paiamolois lhal aio
plausiLlo in lho posloiioi oisliiLulion. Ovoi fuluio quailois, lho spioao in lho piooiclivo
oisliiLulion will iolocl aclual Lohavioi in ioconl quailoi moio sliongly in lho noai loim
ano lho volalilily implicil in lho moool`s paiamolois moio sliongly in lho fai loim.
1hus, foi oxamplo, woio lho moool lo infoi unioalislically low volalilily lhon lho noai
loim woulo oominalo lho oocomposilion of inliinsic vaiianco inlo noai ano longoi loim
(ano convoisoly).
Inliinsic vaiianco ilsolf (column 4 in Lolh laLlos) is viilually ioonlical in lho lwo
oxoicisos. Foi giowlh ialos in GDI ano compononls (lho lisl lhioo soiios) 80/ lo 40/
of lho vaiianco is iosolvoo in lho noai loim. 1his is inluilivoly plausiLlo: lho noai loim
Lolh iovoals ono of lho foui compononls in (84) ano in aooilion Liings lho following lhioo
quailois ono quailoi closoi, fuilhoi iooucing uncoilainly aLoul lhoso giowlh ialos. Foi
houis, wagos ano Foooial funos ovon moio of lho vaiianco, ioughly half, is iosolvoo in lho
noai loim. In lho caso of inlalion woll ovoi 00/ of lho inliinsic vaiianco is so iosolvoo,
a iomaikaLlo lnoing. 1his is consislonl wilh lho moool assigning volalilily lo inlalion
lhal is much loo low in lho caso of inlalion, ano poihaps somowhal loo low in lho caso
of houis, wagos ano lho Foooial funos ialo. Of couiso, olhoi oxplanalions aio possiLlo
as woll, Lul lhoso lnoings molivalo a closoi oxaminalion of inlalion oynamics in lhis
20
ECB
Working Paper Series No 1409
December 2011
Predictive variance Intrinsic variance
Total Extrinsic Intrinsic Due to !
1
Remainder
Consumption 0.2782 0.0264 (0.095) 0.2518 (0.905) 0.0817 (0.324) 0.1702 (0.676)
Investment 4.2767 0.3218 (0.075) 3.9549 (0.925) 1.6159 (0.409) 2.3390 (0.591)
Output 0.4714 0.0308 (0.065) 0.4406 (0.935) 0.1513 (0.343) 0.2893 (0.657)
Hours 1.2488 0.0771 (0.062) 1.1717 (0.938) 0.6689 (0.571) 0.5029 (0.429)
Ination 0.0745 0.0052 (0.070) 0.0693 (0.930) 0.0652 (0.941) 0.0041 (0.059)
Wages 0.1558 0.0072 (0.046) 0.1487 (0.954) 0.0660 (0.444) 0.0826 (0.556)
Fed funds 0.0936 0.0055 (0.059) 0.0881 (0.941) 0.0489 (0.555) 0.0392 (0.445)
Table 2: Decomposition of predictive variance for one-year growth rates 2009:3 - 2010:2,
based on the posterior at 2009:2
model.
6 Conclusion
From a formal but reasonable perspective the goal of Bayesian analysis can generally be
cast as providing a predictive distribution relevant for a decision at hand. In doing so
it integrates information from several sources, including increments to information sets
as predictive distributions are updated in real time. This paper has provided a corre-
sponding analysis of variance. Because integration of information does not typically lead
to linear (Gaussian) models this analysis is necessarily more complex than the familiar
treatment that has been central to statistics for a century. But the complexity poses
no essential complication for simulation methods that are fast, practical, and natural
in the context of modern Bayesian inference. We believe that systematic application of
this analysis of variance will provide greater insight into the structure of models and
information aggregation, and hope that ultimately it will be useful in improving models,
predictions and decisions.
21
ECB
Working Paper Series No 1409
December 2011
References
Box GEP (1980). Sampling and Bayes inference in scientic modeling and robustness.
Journal of the Royal Statistical Society Series A 143: 383-430.
Geweke J (2005). Contemporary Bayesian Econometrics and Statistics. Englewood
Clis NJ: Wiley.
Geweke J (2010). Complete and Incomplete Econometric Models. Princeton: Prince-
ton University Press.
Good IJ (1956). The surprise index for the multivariate normal distribution. Annals
of Mathematical Statistics 27: 1130-1135.
Lancaster T (2004). An Introduction to Modern Bayesian Econometrics. Malden
MA: Blackwell Publishing.
Roberts HV (1965). Probabilistic prediction. Journal of the American Statistical
Association 60: 50-62.
Smets F, Wouters R (2007). Shocks and frictions in US business cycles: A Bayesian
DSGE approach. American Economic Review 97: 586606.
Weiss NA (2005). A Course in Probability. Boston: Addison Wesley.
Zellner A (1971). An Introduction to Bayesian Inference in Econometrics and Sta-
tistics. New York: Wiley.
22
ECB
Working Paper Series No 1409
December 2011
Appendix
The following Matlab code implements the simulation-approximation of variance
decomposition described in Section 3, and was used in for the illustration in Section 5.
function [term1 term2 term3 total]=aov(x)
% This function computes simulation-based method of moments estimates
% of the population decomposition in the paper. The explicit
% computations are in the displays (16)-(18).
% Input:
% x This is a three-dimensional structure. The first dimension
% corresponds to "X_2" and has the m_2 index; the second
% dimension corresponds to "X_3" and has the m_3 index; the
% third dimension corresponds to "X_1" and has the m_1 index.
% Outputs:
% term1 Estimate (16)of the first term of (8)
% term2 Estimate (17) of the second term of (8)
% term3 Estimate (18) of the third term of (8)
%
[M2 M3 M1]=size(x);
term1=var(mean(reshape(x,M2,M3*M1),2),1,1);
term2=mean(var(mean(x,3),1,2),1);
term3=mean(var(reshape(x,M3*M2,M1),1,2),1);
total=term1+term2+term3;
end
WORKI NG PAPER S ERI ES
NO 1409 / DECEMBER 2011
by John Geweke
and Gianni Amisano
ANALYSIS OF
VARIANCE FOR
BAYESIAN
INFERENCE

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