Something wrong with Bayesian IRFs

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.

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:

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.
untitled.pdf (14.4 KB)

Somehow the pictures didn’t get added, attached a pdf instead.
//modin

Please try the unstable version. Both things you report are bugs in 4.4.3 (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.

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 ([Confidence band of Bayesian IRF (SW2007))).

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

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.