Mismatch between Smoothed and Historical Time Series

Hi All
Here is a problem I have not faced before: the Kalman smoothed series does not match with the observed time series used in the estimation. I am using fifteen series and this problem is seen only for one observable,namely output growth. The source of the problem may lie in the following, even though I cannot think of a scientific explanation yet. The estimate of the ‘corresponding’ shock to output (std error and AR1 coefficient), the technology shock is very similar to the prior density I use. Alternatively, when I either use a measurement error for output growth, or another structural shock as the govt spending shock (which affects only the goods market clearing condition), the smoothed output growth series matches the observed analogue perfectly, as they should. Hence, this seems to be a problem with the kind of shock used to match the observable to the model. Has anybody else encountered this problem? I cannot find any errors in the coding of the structural equations.


Unless your model is stochastically singular, the shocks must always account for the behavior of the observables (together with initial conditions). It is basically a matter of accounting. Plug the state transition equation into the observation equation and everything not explained by smoothed states is assigned to the shocks. A mismatch between the smoothed series for the observables and the actual time series should thus not occur. Could you provide sample codes to replicate the issue?

I have a similar problem. When investigating the smoothed series in oo_.SmoothedVariables, there is no mismatch between the simulated series and the corresponding observable series. However, there is a mismatch between the observable series between oo_.SmoothedVariables and oo_.UpdatedVariables, and an even larger mismatch with respect to the observable in my database file. How does Dynare determine the observable series in oo_.SmoothedVariables?

Thank you for your reply

Dear Stefan,

what do you mean? The smoothed series results from the Kalman smoother. They are the best guess of the variables given the information for the whole sample. Given that they are observed, their best guess is the actual value. Hence, there should be no difference unless you assume they are observed only with measurement error.
The Updated Variables are something different and have no direct correspondence to the data. See Pfeifer (2014) An Introduction to Graphs in Dynare at sites.google.com/site/pfeiferecon/dynare