simulation after bayesian estimation

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

simulation after bayesian estimation

Postby shufecj » Sat Oct 08, 2016 8:56 am

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.
Attachments
laborinvest.xls
(64 KiB) Downloaded 102 times
sim.mod
(3.49 KiB) Downloaded 103 times
code.mod
(3.51 KiB) Downloaded 112 times
shufecj
 
Posts: 9
Joined: Fri Jul 22, 2011 5:36 am

Re: simulation after bayesian estimation

Postby jpfeifer » Sat Oct 08, 2016 4:06 pm

Please upload everything into a zip-file and upload it. I need the mode-file.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: simulation after bayesian estimation

Postby shufecj » Sat Oct 08, 2016 4:20 pm

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!
Attachments
paper.rar
(25.07 KiB) Downloaded 118 times
shufecj
 
Posts: 9
Joined: Fri Jul 22, 2011 5:36 am

Re: simulation after bayesian estimation

Postby jpfeifer » Sun Oct 09, 2016 7:32 pm

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: simulation after bayesian estimation

Postby shufecj » Mon Oct 31, 2016 12:59 pm

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
Attachments
screenshot.zip
(1.67 MiB) Downloaded 101 times
shufecj
 
Posts: 9
Joined: Fri Jul 22, 2011 5:36 am

Re: simulation after bayesian estimation

Postby jpfeifer » Sat Nov 05, 2016 8:41 am

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)
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: simulation after bayesian estimation

Postby shufecj » Sun Nov 06, 2016 12:58 am

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!
shufecj
 
Posts: 9
Joined: Fri Jul 22, 2011 5:36 am


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 7 guests