# Bayesian IRF Graphs

Could you please explain how to interpret bayesian graphs?
And why dont they turn zero after a specific period? (like attached results)
Bayesian_IRF.pdf (12.2 KB)

From a soon to be published internal documentation:

Orthogonalized shock to shock_x:

Bayesian IRF plot generated by the bayesian_irf-option of the estimation-command. It is stored in the Output-subfolder. Generally, these IRFs are similar to the ones displayed with stoch_simul and use the same orthogonalization scheme. The main difference is that the stoch_simul-IRFs are computed at the calibrated parameter combination, while the Bayesian IRFs are the mean impulse responses (not to be confused with the IRFs at the mean). The gray shaded areas provide highest posterior density intervals (Highest Posterior Density Interval (HPDI)). If you want to compute classical IRFs after estimation, use stoch_simul after estimation as the latter will set the parameters to the posterior mode/mean, depending on whether you use maximum likelihood or Bayesian estimation. More information can be found in Adjemian, Bastani, Juillard, Karamé, Mihoubi, Perendia, Pfeifer, Ratto, and Villemot (2011)

Note that in your case the IFRs will go back to 0 if you increase the time horizon.

Update: The documentation is now available as Pfeifer (2014): An Introduction to Graphs in Dynare at sites.google.com/site/pfeiferecon/dynare

Thanks man! This is a really helpful documentation!!

do these graph show the explosivness?
If so, what should I do?

If I want to run a stoch simul by replacing all parameters value by those generated by the estimated (bayesian estimation)…How should I proceed? I do not want to pick each parameter value one by one, It will waste my time.
I mean to use code like <load… > and to it automatically

(1) With posterior mode
1a. If you aleady have a filename_mode file available, you first load the mode file using the estimation(datafile=…, mode_file=filename_mode, mh_replics=0) option and then do a stoch_simul right after the estimation command.
1b. If you dont have a mode file available, just do the estimation without implementing MCMC, and then do the stoch_simul

(2) With posterior mean
Do stoch_simul after the estimation command which implements MCMC (mh_replics>0)

Cheers
Reuben

yes, I already have the mode file so I do not want to run again the MCMC procedure (so time consuming). I just need the bayesian IRF for the stoch simul…If I understand <mh_replic=0> in estimation command do it .

Now, I need your aid in order to treat the explosiveness of my model variable. What tips should you suggest in such case?
attached below is the dynare mode file

Thank you @punnoosejacob

1. Do you want to generate IRFs using `stoch_simul` from an already estimated model? Or do you want to generate `bayesian_irfs`?
2. The oscillating IRFs in your mod-file usually indicate a fundamental timing error.

1 - I want to use stoch simul from an already estimated model
2 - what do you mean by timing error, is it from the ARMA equation ? or which one?
can you give me a hint to deal with it? How shoul I harmonize it properly?

Best regards prof @jpfeifer

1. In this case, you can simply use `load_mh_file` together with `mh_replic=0` in the estimation command, followed by `stoch_simul`
2. The oscillating IRFs indicate that somewhere in your model there must be a timing error, e.g. related to the timing of a predetermined state variable. It’s pretty clear that
``````k(+1)= (1-tau)*k+tau*I;
``````

does not conform to Dynare’s timing convention.

How could I generate Bayesian IRFs from an already estimated model?
It seems that, even if I have a posterior estimation result without `bayesian_irfs`, I have to rerun the entire estimation including the MCMC process to obtain Bayesian IRFs.

You could simply run the `estimation`- command with 0 replications the `load_mh_file`-option.

It successfully worked. I always appreciate all your help and insights including other posts.
Thank you very much.