Stoch_simul after estimation vs stoch_simul using posterior

I have a mod file where I estimate via Bayesian and then run stoch_simul to get the theoretical variances. But I find that if I write a new mod file using the posterior mean of parameters and then run stoch_simul to get the theoretical variances, the variances are different from those above. Why are they different?

The Dynare version is 4.2.4

That should not be the case. Does the issue persist in Dynare 4.2.5? If yes, could you post the mod-file and the data-file.

I am experiencing a similar issue: if i run stoch_simul after estimation, I get my output, but if I impose the parameter values I just estimated in a separate file and I use stoch_simul, Dynare tells me that B-K conditions are not satisfied. It seems that does not depend on the version of Dynare I am using. How is that possible?

Every parameter vector must satisfy the Blanchard-Kahn-conditions. However, the parameters after Bayesian estimation are not the mean parameter vector, but the vector of parameter means. This might explain the difference. You can try to get the mode by using

xparam = get_posterior_parameters('mode')
after completing estimation.

1 Like

Sorry, I do not think I am getting it. The vector of parameter means, i.e. the estimation result, should satisfy the Blanchard-Kahn-conditions. Otherwise how could stoch_simul (runned after the estimation) be able to solve the model at the posterior mean?

Thank you for the clarification!

For every parameter vector the BK conditions are satisfied in estimation. But the estimation result is none of these parameters. It is not the median, but the mean. The mean is a convex combination of the estimated parameters. If the stability region is a convex set of the parameters, this particular convex-combination called mean will be inside the stability region. However, in some cases the stability region is not a convex set and the mean parameter vector is outside of it. In these cases, stoch_simul after estimation will crash because the BK-conditions are violated.


Dear Prof. Pfeifer,

You mentioned that we can use the command “xparam = get_posterior_parameters(‘mode’)” to get the mode. However, after the estimation, we cna get the posterior mode in the Matlab command window directly (the third column in the attached picture). why do we need this command to get the mode? Besides, Can you specify how to use this command? I did not find this command in the Dynare manual. Do we add this command after the estimation command, or write it in the matlab command window after completing the estimation?

Thank you,
Alex

After running the MCMC, the parameters will be set to the posterior mean. If you want to simulate the model at the posterior mode instead of the mean, you would need

xparam = get_posterior_parameters('mode');
stoch_simul(order=1,irf=20);

Thank you Prof. Pfeifer for answering my questions.