Page 1 of 1

Kalman filtering and smoothing

PostPosted: Thu Jan 19, 2006 1:51 pm
by jmaih
Dear all,
I would like to understand how Dynare computes the Kalman filter and the smoother.

1- Starting with matrices dr_.ghx and dr_.ghu, how to obtain (or identify) matrices zz, psi and phi in a model whose solution is given by:

Y_t=zz*GAM_t+W_t (measurement equation)

GAM_t=phi*GAM_{t-1}+psi*V_t (transition equation)

with E(V_tV_t')=SIG_v, E(W_tW_t')=SIG_w

2- How does Dynare compute the Kalman filter and especially in a model with measurement errors as the one above. Is there any file I can take a look at in order to understand the mechanisms at work?

Thanks,
Junior

Re: Kalman filtering and smoothing

PostPosted: Fri Jan 20, 2006 1:33 pm
by MichelJuillard
jmaih wrote:Dear all,
I would like to understand how Dynare computes the Kalman filter and the smoother.
Junior


Dear Junior,

a good reference is A. Harvey (1989) Forecasting, structural time series models and the Kalman filter. Cambridge University Press.

For diffuse filters, we use
"Filtering and Smoothing of State Vector for Diffuse State Space
Models", S.J. Koopman and J. Durbin (2003, in Journal of Time Series Analysis, vol. 24(1), pp. 85-98).

the code is implemented in DiffuseLikelihood*.m and DiffuseKalmanSmoother*.m

the top of the functions implement the diffuse filter, at the end you find the standard one.

Kind regards

Michel

PostPosted: Fri Jan 20, 2006 1:44 pm
by jmaih
Dear Michel,
Thank you so much!

All the best,
Junior