Simulation after estimation

Hi all,

I have a problem about the following codes

Since the signs of some cross correlations between the variables are wrong after estimation, I want to do counterfactuals to figure out the source of the problem by looking at posterior modes.

In the first step, I use the above two lines to try to find the posterior modes and see cross correlations from the command “stoch_simul”.

In the second step, I comment out the command “estimation” and set the parameters to be estimated to their posterior modes (including variances of the exogenous shocks) derived from the 1st step.

However, the 2nd step only results in failing BK conditions, though I can see various results generated by “estimation” and “stoch_simul” in the 1st step. According to the mannual, the above two lines of codes should set the parameters to the posterior modes which is exactly what I did in the 2nd step. I can’t see the reason why the simulation results will differ.

Thanks heaps for any ideas.

cheers,
yc

In Bayesian estimation they are set to their mean. This might explain the difference.

But I didn’t run Markov chains… just searching for the posterior mode. So right after the command “estimation”, “stoch_simul” should set the parameters at their modes.

Then please provide the mod-file

Sorry, I’ve replaced the previous mode file. But now trials are good. Not sure if I made a typo, though I think not very likely. I’ll save the mode file if I am trapped in the same problem again. Thank you.