Skip to content
Snippets Groups Projects
Commit ecd03815 authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

Port bugfix #920 for Bayesian IRFs to BVAR routine

Fixes plotting of IRFs where IRFs turn from negative to positive
parent 8bc946c1
No related branches found
No related tags found
No related merge requests found
...@@ -116,13 +116,9 @@ for shock=1:ny ...@@ -116,13 +116,9 @@ for shock=1:ny
figure('Name',['Posterior BVAR Impulse Responses (shock in equation ' int2str(shock) ').']); figure('Name',['Posterior BVAR Impulse Responses (shock in equation ' int2str(shock) ').']);
for variable=1:ny for variable=1:ny
subplot(number_of_rows,number_of_columns,variable); subplot(number_of_rows,number_of_columns,variable);
h1 = area(1:options_.irf,squeeze(posterior_up_conf_irfs(shock,variable,:))); h1 = area(1:options_.irf,squeeze(posterior_up_conf_irfs(shock,variable,:)),'FaceColor',[.9 .9 .9],'BaseValue',min([min(posterior_up_conf_irfs(shock,variable,:)),min(posterior_down_conf_irfs(shock,variable,:))]));
set(h1,'BaseValue',min([min(posterior_up_conf_irfs(shock,variable,:)),min(posterior_down_conf_irfs(shock,variable,:))]))
set(h1,'FaceColor',[.9 .9 .9])
hold on hold on
h2 = area(1:options_.irf,squeeze(posterior_down_conf_irfs(shock,variable,:))); h2 = area(1:options_.irf,squeeze(posterior_down_conf_irfs(shock,variable,:)),'FaceColor',[1 1 1],'BaseValue',min([min(posterior_up_conf_irfs(shock,variable,:)),min(posterior_down_conf_irfs(shock,variable,:))]));
set(h2,'BaseValue',min([min(posterior_up_conf_irfs(shock,variable,:)),min(posterior_down_conf_irfs(shock,variable,:))]))
set(h2,'FaceColor',[1 1 1])
plot(1:options_.irf,squeeze(posterior_median_irfs(shock,variable,:)),'-k','linewidth',2) plot(1:options_.irf,squeeze(posterior_median_irfs(shock,variable,:)),'-k','linewidth',2)
axis tight axis tight
hold off hold off
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment