Variance decomposition in Bayesian estimation vs stochastic simulation


I have estimated my DSGE model. I find that the variancee decompositions differ drastically between posterior variance decomposition part (resulting from moments_varendo option) and stochastic simulation part which I put after estimation. It looks likely stochastic simulation provides more stable variance decomposition while momens_varendo part depends very much on what observable I use. Which one should be trusted more? My gut feeling is that stichastic simulation is more trustworthy because it takes estimated values of the parameters, runs thousands of replications and report the irf and vd. I am actually quite confused about this anomaly. Can anyone clarify?


I am not sure I understand the problem. What do you mean with

  1. depends very much on what observable I use
  2. takes estimated values of the parameters, runs thousands of replications and report the irf and vd

The variance decomposition should only depend on the estimated parameters and usually is a theoretic one (unless you use the periods option). If you use Dynare 4.5, the variance decomposition of stoch_simul is conducted at the posterior mean, while the one from estimation is the mean variance decomposition. If the two differ that much, it often indicates that the MCMC did not converge yet, making the mean decomposition very different from the decomposition at the mode.


Dear JP
That response helps. There are two variance decompositions, one based on moments_varendo command and the other is based on the stochastic simulation command. What you are saying is that two differ because the former is based on posterior mean and the latter is based on posterior mode.
If they differ too much you say that convergence is an issue but my multivariate m2 and m3 plots do not show any such symptoms. Blue and red curves converge and become flat. The programme runs smoothly with 5 Markov chains and 20k mh replics without any complaints.

The issue here is that if I change the observable for estimation, the former VD (based on moments_varendo is very sensitive but the latter VD (based on stoch simul ) is not. I think it may be because that mean is sensitive to outliers but mode is not. It is just a wide guess.
However, my mean VDs make more economic sense. The mode VDs seem to be dominated by one shock.


No, that was not what I was saying. estimation computes the variance decomposition for various parameter draws and then takes the average over the variance decomposition. That average can be quite different from the one at the posterior mean. What happens if you only use 1 chain, but with a million draws?


Hi Professor Pfeifer,

I also have the same problem. After estimation, the variance decomposition documented in oo_.PosteriorTheoreticalMoments is significantly different from the variance decomposition which is based on simulation using the parameter values of posterior mean. This happpens no matter I use 2 chain (the MCMC converges well) or I use the 1 chain with 1 million draw.
The dynare 4.5.1 says that this updated version already corrected the calcluation of variance decomposition. I’m not sure how to further fix this issue?



For further reference: I also reset the posterior_sampling_method=‘independent_metropolis_hastings’ and the problem isn’t solved. Hope to hear any suggestion!


Please provide the files to replicate the issue.


Dear Professor Pfeifer,

I’ve gone through the other discussion of the variance decomposition issue and the MCMC covergence diagnostics. Besides checking the case of one MCMC chain and 2 MCMC chain, I guess I need to check the case of chain_block=5 and draw 1 millions time. Currently I’m running this issue, and I will provide my code if the issue is still there.