Commit 00a87039 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

update irf macro

parent 966bef71
function make_report_irfs(oo) function make_report_irfs(M, oo)
% Builds posterior IRFs after the MH algorithm. % Builds posterior IRFs after the MH algorithm.
% %
% INPUTS % INPUTS
...@@ -36,21 +36,36 @@ function make_report_irfs(oo) ...@@ -36,21 +36,36 @@ function make_report_irfs(oo)
disp('make_report_irfs: oo_.irfs is empty'); disp('make_report_irfs: oo_.irfs is empty');
return return
end end
if ~isfield(M, 'exo_names')
disp('make_report_irfs: M_.exo_names does not exist');
return
end
if ~isfield(M, 'endo_names')
disp('make_report_irfs: M_.endo_names does not exist');
return
end
n6 = 1;
r = report(); r = report();
for i = 1:length(fields) for i = 1:length(M.exo_names)
if mod(i-1, 6) == 0 for j = 1:length(M.endo_names)
r = r.addPage('title', {'Canned Irf Report'}); if mod(n6 - 1, 6) == 0
r = r.addPage('title', {'Canned Irf Report'; ['shock ' M.exo_names(i)]});
r = r.addSection('cols', 2); r = r.addSection('cols', 2);
n6 = 1;
end end
r = r.addGraph('data', dseries(oo.irfs.(fields{i})'), ... idx = ismember(fields,[M.endo_names(j) '_' M.exo_names(i)]);
'title', strrep(fields{i}, '_', '\_'), ... if any(idx)
r = r.addGraph('data', dseries(oo.irfs.(fields{idx})'), ...
'title', strrep(fields{idx}, '_', '\_'), ...
'titleFormat', '\Huge', ... 'titleFormat', '\Huge', ...
'showGrid', false, ... 'showGrid', false, ...
'yTickLabelZeroFill', false, ... 'yTickLabelZeroFill', false, ...
'showZeroLine', true, ... 'showZeroLine', true, ...
'zeroLineColor', 'red'); 'zeroLineColor', 'red');
n6 = n6 + 1;
end
end
end end
r.write(); r.write();
r.compile(); r.compile();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment