Page 1 of 1

simulation after bayesian estimation

PostPosted: Sat Oct 08, 2016 8:56 am
by shufecj
Hello all,

I am solving a model using Bayesian estimation with dynare. After running the code, I get the mode of parameters and standard deviations of exogenous shocks. In principle, I should be able to simulate the model when I set these parameters and standard deviations equal to the mode. Is it right?
However, when I try to simulate the model, dynare shows “Blanchard Kahn conditions” doesn’t hold. Why is that?
It really puzzles me. Thanks a lot!

Best!
Jie Chen

P.S. Attachment is the codes and data I use. The file “code.mod” is to run the Bayesian estimation. The file “labroinvest.xls” is the data one should use when run the “code.mode”. It will take about half an hour to get the mode. The file “sim.mod” is to run the simulation.
The mode I get is stored in “code_mode.mat”. But I don't know how to load a ".mat" file.

Re: simulation after bayesian estimation

PostPosted: Sat Oct 08, 2016 4:06 pm
by jpfeifer
Please upload everything into a zip-file and upload it. I need the mode-file.

Re: simulation after bayesian estimation

PostPosted: Sat Oct 08, 2016 4:20 pm
by shufecj
jpfeifer wrote:Please upload everything into a zip-file and upload it. I need the mode-file.

I have upload the zip file and it contains the mode-file now. Thank you so much!

Re: simulation after bayesian estimation

PostPosted: Sun Oct 09, 2016 7:32 pm
by jpfeifer
Are you sure you are working with a correct mode-file? When I use
Code: Select all
mode_file=code_mode

in your estimation file code.mod I get the same error, making it very unlikely that the mode-file came from this mod-file.

Re: simulation after bayesian estimation

PostPosted: Mon Oct 31, 2016 12:59 pm
by shufecj
jpfeifer wrote:Are you sure you are working with a correct mode-file? When I use
Code: Select all
mode_file=code_mode

in your estimation file code.mod I get the same error, making it very unlikely that the mode-file came from this mod-file.


Sorry for the late reply. My computer broke down and I have to fix it.
It is strange that you can't run the code when using "mode_file=code_mode" as I can run it. (see attachment as the screenshot of the result as well as the code named "code1") Can you help me figure out why it is the case. My version of dynare is 4.3.3.
Thank you very much!

Jie Chen

Re: simulation after bayesian estimation

PostPosted: Sat Nov 05, 2016 8:41 am
by jpfeifer
Your model is somewhat strange in that it requires a unit root to be counted as an explosive root. This is what estimation does by setting
Code: Select all
options_.qz_criterium=1-1e-6;

The simulation code in contrast uses
Code: Select all
options_.qz_criterium=1+1e-6;

by default.
You have to use
Code: Select all
stoch_simul(qz_criterium=0.9999999)

Re: simulation after bayesian estimation

PostPosted: Sun Nov 06, 2016 12:58 am
by shufecj
jpfeifer wrote:Your model is somewhat strange in that it requires a unit root to be counted as an explosive root. This is what estimation does by setting
Code: Select all
options_.qz_criterium=1-1e-6;

The simulation code in contrast uses
Code: Select all
options_.qz_criterium=1+1e-6;

by default.
You have to use
Code: Select all
stoch_simul(qz_criterium=0.9999999)


It works. It really helps me. Thank you so much!