Page 1 of 1

Bayesian IRFs retrieval

PostPosted: Fri Jan 30, 2015 10:01 pm
by aadegboye abiodun
Hi everyone,
I estimated a DSGE model with Dynare with Bayesian estinmation. The Bayesian IRFs showed and appeared with the grey areas showing bounds in the result in the pup up window but later disapperaed. How do i handle it. I want to use the Byesian IRFs as it is with grey dust or care.
Kindly guide

Re: Bayesian IRFs retrieval

PostPosted: Sat Jan 31, 2015 7:43 am
by jpfeifer
As documented on Pfeifer (2014): An Introduction to Graphs in Dynare at https://sites.google.com/site/pfeiferecon/dynare, they are stored in the Output subfolder.

Re: Bayesian IRFs retrieval

PostPosted: Sat Jan 31, 2015 9:38 pm
by aadegboye abiodun
Hi Jfpeifer,


Thank you for the reply so helpful. I want to ask do I plot the Bayesian posteriorIRF manually using MATLAB? If yes, am I to plot the mean for instance and hold it on so as to plot the bounds HPDinf and HPDsup together with it? Kindly suggest what I can do to place the grey colour or shape on it.

Re: Bayesian IRFs retrieval

PostPosted: Sun Feb 01, 2015 7:55 am
by jpfeifer
If you want to do the graphs manually, you need to work with area-plots. The code Dynare uses is:
Code: Select all
                h1 = area(1:options_.irf,HPDIRF(:,2,j,i));
                set(h1,'FaceColor',[.9 .9 .9]);
                set(h1,'BaseValue',min(HPDIRF(:,1,j,i)));
                hold on
                h2 = area(1:options_.irf,HPDIRF(:,1,j,i),'FaceColor',[1 1 1],'BaseValue',min(HPDIRF(:,1,j,i)));
                set(h2,'FaceColor',[1 1 1]);
                set(h2,'BaseValue',min(HPDIRF(:,1,j,i)));
                plot(1:options_.irf,MeanIRF(:,j,i),'-k','linewidth',3)
                % plot([1 options_.irf],[0 0],'-r','linewidth',0.5);
                box on
                axis tight
                xlim([1 options_.irf]);
                hold off

where HPDIRF(:,2,j,i) is the HPDsup and HPDIRF(:,1,j,i) is the HPDinf. You need to adjust is accordingly.