Page 1 of 1

Something wrong with Bayesian IRFs

PostPosted: Mon Apr 18, 2016 5:07 pm
by modin
Dear Mr. Pfeifer

I am estimating a modified version of Smets and Wouters (2003) and seem to be experiencing some issues with the Bayesian impulse responses. First of all the higher posterior density interval seems weird from my perspective as they appear to be crossing the mean impulse response in for example the case of the r-variable(not sure about if this is actually the case). Secondly, the shaded areas seem to be cut off as soon as another line is intersecting said area (see attached .png, e.g. variables Y, C, I). I assume this is not supposed to happen based on previous examples, e.g. your introduction to Dynare graphs.

I was just wondering if you (or anyone else for that matter) have any idea what could be causing this. Based on the convergence diagnostics and the prior/posterior plots I seem to be having convergence issues due to a misspecified model, however, I don't see how this would cause the shaded areas to look they way they are in this example.

I also get the warning below, although HPD intervals seem to be computed anyways. This message does not go away even after drastically increasing the number of draws/reducing drop rate.
Code: Select all
Log data density is 396.790985.
posterior_moments: There are not enough draws computes to compute HPD Intervals. Skipping their computation.
posterior_moments: There are not enough draws computes to compute deciles. Skipping their computation.



I currently run the following estimation command:
Code: Select all
estimation(datafile=data, lik_init=2, mh_nblocks=6, mh_jscale=0.5, mode_compute=6, mh_replic=60000, mh_drop=0.5, plot_priors=0,
bayesian_irf, irf=20,moments_varendo, conditional_variance_decomposition=[1 2 4 8 12 16 20]) Y C W L R K I PIE r;

and I don't seem to be getting any historical variance decomposition either, not sure why this is the case.

Any help or input would be appreciated. Let me know if you want to have a look at the script file

Regards,
modin

edit: pic didn't get uploaded at first, attached new pdf.

Re: Something wrong with Bayesian IRFs

PostPosted: Tue Apr 19, 2016 7:13 am
by modin
Somehow the pictures didn't get added, attached a pdf instead.
//modin

Re: Something wrong with Bayesian IRFs

PostPosted: Tue Apr 19, 2016 7:06 pm
by jpfeifer
Please try the unstable version. Both things you report are bugs in 4.4.3 (http://www.dynare.org/DynareWiki/KnownBugs). The first one is an imcompatibility with the new Matlab graphics engine, while the second one is a wrong display, while the computations are actually conducted and stored.

Re: Something wrong with Bayesian IRFs

PostPosted: Wed Apr 20, 2016 4:57 pm
by modin
Thank you very much.

The unstable version was unable to estimate the model with the same estimation command, however, I found an old post in which you attach a corrected version of the "PosteriorIRF_core2.m" file and this works perfectly (http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=6783&p=19624#p19624).

I just want to ask you a final question. If I want to change the appearance of the IRFs, which or what .m files should I look to modify, or can this be done with options in an easier way? And finally, can I after estimation is completed, use any function in the .m files to plot the Bayesian IRF calling the stored objects in oo_?

//modin

Re: Something wrong with Bayesian IRFs

PostPosted: Thu Apr 21, 2016 8:42 am
by jpfeifer
In this case you should customize the graphs by using the results in oo_ to plot it exactly the way you want using Matlab's plot commands. Do not try to modify Dynare's routines for this, it is not worth the trouble.