Tommaso Proietti 429
the joint posterior density:
f(ς 0 ,...,ςn|Yn)=f(ςn|y)
n∏− 1
t= 0
f(ςt|ςt+ 1 ,...,ςn;Yn).
Conditional random vectors are generated recursively: in the forward step the
Kalman filter is run and the innovations, their covariance matrix and the Kalman
gain are stored. In the backwards sampling step conditional random vectors are
generated recursively fromςt|ςt+ 1 ,...,ςn;y; the algorithm keeps track of all the
changes in the mean and the covariance matrix of these conditional densities. The
simulated disturbances are then inserted into the transition equation to obtain a
sample fromα|Yn.
A more efficient simulation smoother has been developed by Durbin and
Koopman (2002). The gain in efficiency arises from the fact that only the first
conditional moments of the states or the disturbances need to be evaluated. Let
us redefineςt=(′t,η′t)′and letς ̃ =E(ς|Yn), whereςis the stack of the vec-
torsςt;ς ̃is computed by the disturbance smoother (see Koopman, 1993, and
Appendix C, section 9.7.3). We can writeς=ς ̃+ς∗, whereς∗=ς−ς ̃is the distur-
bance smoothing error, with conditional distributionς∗|Yn∼N( 0 ,V), such that
the covariance matrixVdoes not depend on the observations, and thus does not
vary across the simulations (the diagonal blocks are computed by the smoothing
algorithm in Appendix C, section 9.7.3). A sample fromς∗|Ynis constructed as
follows: we first draw the disturbances from their unconditional Gaussian distri-
butionς+∼NID(0,I)and construct the pseudo observationsy+recursively from
α+t =Ttα+t− 1 +Htη+t,y+t =Ztα+t +Gt+t,t=1, 2,...,n, where the initial draw is
α+ 0 ∼N( 0 ,H 0 H′ 0 ). The Kalman filter and the smoothing algorithm computed on
the simulated observationsy+t will produceς ̃+t andα ̃+t, andς+t −ς ̃+t will be the
desired draw fromς∗|Yn. Hence,ς ̃+ς+t −ς ̃+t is a sample fromς|Yn∼N(ς ̃,V).
Acknowledgments
The author wishes to thank Andrew Harvey, Terence Mills and Alberto Musso for their useful
suggestions.
Notes
- Assumingμ∗=(μ 1 ,μ 2 )′∼N( 0 ,μ), and that the processμthas started in the indefinite
past,μ−^1 → 0 , and thus the quadratic formμ′∗μ−^1 μ∗converges to zero. - All the computations in this chapter have been performed using Ox version 4 (see Doornik,
2006). - The slope parameter is included in the state vector; the transition equation isβt=βt− 1 ,
withβ 0 being a diffuse parameter (see Appendix C, section 9.7).
References
Anderson, B.D.O. and J.B. Moore (1979)Optimal Filtering. Englewood Cliffs, NJ: Prentice-Hall.
Ansley, C. and R. Kohn (1986) Prediction mean square error for state space models with
estimated paramaters.Biometrika 73 , 467–73.