Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
MichelJuillard
dynare
Commits
ecd03815
Commit
ecd03815
authored
Jun 15, 2015
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/bvar_irf.m
View file @
ecd03815
...
...
@@ -116,13 +116,9 @@ for shock=1:ny
figure
(
'Name'
,[
'Posterior BVAR Impulse Responses (shock in equation '
int2str
(
shock
)
').'
]);
for
variable
=
1
:
ny
subplot
(
number_of_rows
,
number_of_columns
,
variable
);
h1
=
area
(
1
:
options_
.
irf
,
squeeze
(
posterior_up_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
])
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
,:))]));
hold
on
h2
=
area
(
1
:
options_
.
irf
,
squeeze
(
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
])
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
,:))]));
plot
(
1
:
options_
.
irf
,
squeeze
(
posterior_median_irfs
(
shock
,
variable
,:)),
'-k'
,
'linewidth'
,
2
)
axis
tight
hold
off
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment