| 1 |
function rep = CountryTablePage(rep, countryAbbr, countryName, db_q, dc_q, db_a, dc_a, trange, vline_after) |
| 2 |
% Copyright © 2013-2023 Dynare Team |
| 3 |
% |
| 4 |
% This file is part of Dynare. |
| 5 |
% |
| 6 |
% Dynare is free software: you can redistribute it and/or modify |
| 7 |
% it under the terms of the GNU General Public License as published by |
| 8 |
% the Free Software Foundation, either version 3 of the License, or |
| 9 |
% (at your option) any later version. |
| 10 |
% |
| 11 |
% Dynare is distributed in the hope that it will be useful, |
| 12 |
% but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
% GNU General Public License for more details. |
| 15 |
% |
| 16 |
% You should have received a copy of the GNU General Public License |
| 17 |
% along with Dynare. If not, see <https://www.gnu.org/licenses/>. |
| 18 |
|
| 19 |
seriesNames = {{'RS_', 'Short Term Interest Rate'}, ... |
| 20 |
{'RR_', 'Real Interest Rate'}, ... |
| 21 |
{'BLT_','Bank Lending Tightening' }, ... |
| 22 |
{'PCH_GROWTH_', 'Real GDP Growth (@q ar)'}, ... |
| 23 |
{'PCH_GROWTH4_', '\% y-o-y'}, ... |
| 24 |
{'PCH_GROWTH_BAR_', 'Potential GDP Growth (@q ar)'}, ... |
| 25 |
{'PCH_GROWTH4_BAR_', '\% y-o-y'}, ... |
| 26 |
{'PCH_PIE_', 'Headline CPI Inflation (@q ar)'}, ... |
| 27 |
{'PCH_PIE4_', '\% y-o-y'}, ... |
| 28 |
{'PCH_PIEX_', 'Core CPI Inflation (@q ar)'}, ... |
| 29 |
{'PCH_PIEX4_', '\% y-o-y'}, ... |
| 30 |
{'PCH_PIE_GAS_', 'Gas Inflation (@q ar)'}, ... |
| 31 |
{'PCH_PIE4_GAS_', '\% y-o-y'}, ... |
| 32 |
{'PCH_PIE_CONSFOOD_', 'Food Inflation (@q ar)'}, ... |
| 33 |
{'PCH_PIE4_CONSFOOD_', '\% y-o-y'}, ... |
| 34 |
{'PCH_DOT_REER_T_', 'REER Depreciation (@q ar)'}, ... |
| 35 |
{'PCH_DOT4_REER_T_', '\% y-o-y'}, ... |
| 36 |
{'Y_', 'Output Gap'}, ... |
| 37 |
{'UNR_', 'Unemployment Rate'}, ... |
| 38 |
{'UNR_BAR_', 'NAIRU'}, ... |
| 39 |
{'UNR_GAP_', 'Unemployment Gap'}}; |
| 40 |
|
| 41 |
otherThree = {'EA6','LA6','RC6'}; |
| 42 |
notForOtherThree = {'BLT_', 'UNR_', 'UNR_BAR_', 'UNR_GAP_'}; |
| 43 |
|
| 44 |
rep.addTable('title', countryName, ... |
| 45 |
'range', {trange, dates('2012a'):dates('2014a')}, ... |
| 46 |
'vlineAfter', {vline_after dates('2014q4')}, ... |
| 47 |
'writeCSV', true, ... |
| 48 |
'highlightRows', {'gray!22', 'cyan!33', 'blue!44', 'red!55'}); |
| 49 |
|
| 50 |
for i = 1:length(seriesNames) |
| 51 |
if any(strcmp(countryAbbr, otherThree)) && ... |
| 52 |
any(strcmp(seriesNames{i}{1}, notForOtherThree)) |
| 53 |
continue |
| 54 |
end |
| 55 |
db_q.tex_rename_([seriesNames{i}{1} countryAbbr], seriesNames{i}{2}); |
| 56 |
rep.addSeries('data', db_q{[seriesNames{i}{1} countryAbbr]}, ... |
| 57 |
'tableDataRhs', db_a{[seriesNames{i}{1} countryAbbr]}); |
| 58 |
delta = db_q{[seriesNames{i}{1} countryAbbr]}-dc_q{[seriesNames{i}{1} countryAbbr]}; |
| 59 |
delta.tex_rename_('$\Delta$'); |
| 60 |
|
| 61 |
deltaa = db_a{[seriesNames{i}{1} countryAbbr]}-dc_a{[seriesNames{i}{1} countryAbbr]}; |
| 62 |
deltaa.tex_rename_('$\Delta$'); |
| 63 |
rep.addSeries('data', delta, ... |
| 64 |
'tableShowMarkers', true, ... |
| 65 |
'tableRowIndent', 2, ... |
| 66 |
'tableDataRhs', deltaa); |
| 67 |
end |
| 68 |
end |