Smoother option to obtain the distribution of a variable

Dear all,

I am trying to understand how dynare computes the posterior distribution of variables that are not included in the list of observables (eg. the output gap).
When the “smoother” option is specified in the estimation command, dynare provides the posterior distribution for all the variables, including the ones that are not observed, like potential output. In dynare version 4.0.3 , the internal function prior_posterior_statistics.m does the job. My question is whether we are obtaining directly draws from the distribution of the state vector conditional on parameters and observables (eg. Carter and Kohn, 1994). As far as I can go inside the scenes of dynare, it seems that the distribution obtained by smoother is only taking into account parameter uncertainty (by using subdraws from the MH algorithm), and not the uncertainty coming from the fact that those variables are not observed. Rather than obtaining the distribution of the outpug gap, dynare seems to be giving the distribution of the “smoothed” output gap, which is not my object of intereset.

Please, let me know whether I am wrong or I am missing some part of the story.

Hi, Your understanding is correct. Dynare only reports the posterior distribution of the smoothed shocks and latent endogenous variables. In the smoother files we do not compute the variance of the smoothed latent variables or shocks to save time and memory. We should write other smoother routines and call them to compute these variances… There is no technical difficulties here, we would just have to add two a three lines of codes (given in any textbook) in the smoother routines. However I don’t know how to “mix” the uncertainty on the parameters and these variances…