Skip to content
Snippets Groups Projects
Commit 00a87039 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

update irf macro

parent 966bef71
No related branches found
No related tags found
No related merge requests found
function make_report_irfs(oo)
function make_report_irfs(M, oo)
% Builds posterior IRFs after the MH algorithm.
%
% INPUTS
......@@ -36,21 +36,36 @@ function make_report_irfs(oo)
disp('make_report_irfs: oo_.irfs is empty');
return
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();
for i = 1:length(fields)
if mod(i-1, 6) == 0
r = r.addPage('title', {'Canned Irf Report'});
for i = 1:length(M.exo_names)
for j = 1:length(M.endo_names)
if mod(n6 - 1, 6) == 0
r = r.addPage('title', {'Canned Irf Report'; ['shock ' M.exo_names(i)]});
r = r.addSection('cols', 2);
n6 = 1;
end
r = r.addGraph('data', dseries(oo.irfs.(fields{i})'), ...
'title', strrep(fields{i}, '_', '\_'), ...
idx = ismember(fields,[M.endo_names(j) '_' M.exo_names(i)]);
if any(idx)
r = r.addGraph('data', dseries(oo.irfs.(fields{idx})'), ...
'title', strrep(fields{idx}, '_', '\_'), ...
'titleFormat', '\Huge', ...
'showGrid', false, ...
'yTickLabelZeroFill', false, ...
'showZeroLine', true, ...
'zeroLineColor', 'red');
n6 = n6 + 1;
end
end
end
r.write();
r.compile();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment