Pass options_ to dyn_latex_table.m to make it honor noprint option

time-shift
Johannes Pfeifer 2016-05-31 08:22:19 +02:00
parent c6f98433d2
commit f851252b25
6 changed files with 19 additions and 15 deletions

View File

@ -105,7 +105,7 @@ dyntable(my_title,IFAC_header,param_name,Ifac',lh,12,3);
skipline() skipline()
if options_.TeX if options_.TeX
dyn_latex_table(M_,my_title,'MCMC_inefficiency_factors',IFAC_header_tex,param_name_tex,Ifac',lh,12,3); dyn_latex_table(M_,options_,my_title,'MCMC_inefficiency_factors',IFAC_header_tex,param_name_tex,Ifac',lh,12,3);
end end
record.InefficiencyFactorsPerBlock = Ifac; record.InefficiencyFactorsPerBlock = Ifac;
update_last_mh_history_file(MetropolisFolder, ModelName, record); update_last_mh_history_file(MetropolisFolder, ModelName, record);
@ -184,7 +184,7 @@ if nblck == 1 % Brooks and Gelman tests need more than one block
headers = char(Geweke_tex_header); headers = char(Geweke_tex_header);
lh = size(param_name_tex,2)+2; lh = size(param_name_tex,2)+2;
my_title=sprintf('Geweke (1992) Convergence Tests, based on means of draws %d to %d vs %d to %d. p-values are for $\\\\chi^2$-test for equality of means.',first_obs_begin_sample,last_obs_begin_sample,first_obs_end_sample,NumberOfDraws); my_title=sprintf('Geweke (1992) Convergence Tests, based on means of draws %d to %d vs %d to %d. p-values are for $\\\\chi^2$-test for equality of means.',first_obs_begin_sample,last_obs_begin_sample,first_obs_end_sample,NumberOfDraws);
dyn_latex_table(M_,my_title,'geweke',headers,param_name_tex,datamat,lh,12,4,additional_header); dyn_latex_table(M_,options_,my_title,'geweke',headers,param_name_tex,datamat,lh,12,4,additional_header);
end end
skipline(2); skipline(2);
return; return;

View File

@ -73,7 +73,7 @@ if options_.nomoments == 0
'KURTOSIS'); 'KURTOSIS');
dyntable(title,headers,labels,z,size(labels,2)+2,16,6); dyntable(title,headers,labels,z,size(labels,2)+2,16,6);
if options_.TeX if options_.TeX
dyn_latex_table(M_,title,'sim_moments',headers,labels_TeX,z,size(labels,2)+2,16,6); dyn_latex_table(M_,options_,title,'sim_moments',headers,labels_TeX,z,size(labels,2)+2,16,6);
end end
end end
@ -92,7 +92,7 @@ if options_.nocorr == 0
if options_.TeX if options_.TeX
headers = char('VARIABLE',M_.endo_names_tex(ivar,:)); headers = char('VARIABLE',M_.endo_names_tex(ivar,:));
lh = size(labels,2)+2; lh = size(labels,2)+2;
dyn_latex_table(M_,title,'sim_corr_matrix',headers,labels_TeX,corr,size(labels,2)+2,8,4); dyn_latex_table(M_,options_,title,'sim_corr_matrix',headers,labels_TeX,corr,size(labels,2)+2,8,4);
end end
end end
end end
@ -116,7 +116,7 @@ if ar > 0
if options_.TeX if options_.TeX
headers = char('VARIABLE',int2str([1:ar]')); headers = char('VARIABLE',int2str([1:ar]'));
lh = size(labels,2)+2; lh = size(labels,2)+2;
dyn_latex_table(M_,title,'sim_autocorr_matrix',headers,labels_TeX,autocorr,size(labels_TeX,2)+2,8,4); dyn_latex_table(M_,options_,title,'sim_autocorr_matrix',headers,labels_TeX,autocorr,size(labels_TeX,2)+2,8,4);
end end
end end
@ -165,7 +165,7 @@ if ~options_.nodecomposition
headers = char(' ',headers); headers = char(' ',headers);
labels = deblank(M_.endo_names_tex(ivar,:)); labels = deblank(M_.endo_names_tex(ivar,:));
lh = size(labels,2)+2; lh = size(labels,2)+2;
dyn_latex_table(M_,title,'sim_var_decomp',char(headers,'Tot. lin. contr.'),labels_TeX,[oo_.variance_decomposition sum(oo_.variance_decomposition,2)],lh,8,2); dyn_latex_table(M_,options_,title,'sim_var_decomp',char(headers,'Tot. lin. contr.'),labels_TeX,[oo_.variance_decomposition sum(oo_.variance_decomposition,2)],lh,8,2);
end end
if options_.order == 1 if options_.order == 1

View File

@ -70,7 +70,7 @@ if size(stationary_vars, 1) > 0
if options_.TeX if options_.TeX
labels = deblank(M_.endo_names_tex(ivar,:)); labels = deblank(M_.endo_names_tex(ivar,:));
lh = size(labels,2)+2; lh = size(labels,2)+2;
dyn_latex_table(M_,title,'th_moments',headers,labels,z,lh,11,4); dyn_latex_table(M_,options_,title,'th_moments',headers,labels,z,lh,11,4);
end end
if M_.exo_nbr > 1 && ~nodecomposition if M_.exo_nbr > 1 && ~nodecomposition
@ -93,7 +93,7 @@ if size(stationary_vars, 1) > 0
headers = char(' ',headers); headers = char(' ',headers);
labels = deblank(M_.endo_names_tex(ivar(stationary_vars),:)); labels = deblank(M_.endo_names_tex(ivar(stationary_vars),:));
lh = size(labels,2)+2; lh = size(labels,2)+2;
dyn_latex_table(M_,title,'th_var_decomp_uncond',headers,labels,100*oo_.gamma_y{options_.ar+2}(stationary_vars,:),lh,8,2); dyn_latex_table(M_,options_,title,'th_var_decomp_uncond',headers,labels,100*oo_.gamma_y{options_.ar+2}(stationary_vars,:),lh,8,2);
end end
end end
end end
@ -143,7 +143,7 @@ if options_.nocorr == 0 && size(stationary_vars, 1) > 0
labels = deblank(M_.endo_names_tex(ivar(i1),:)); labels = deblank(M_.endo_names_tex(ivar(i1),:));
headers=char('Variables',labels); headers=char('Variables',labels);
lh = size(labels,2)+2; lh = size(labels,2)+2;
dyn_latex_table(M_,title,'th_corr_matrix',headers,labels,corr,lh,8,4); dyn_latex_table(M_,options_,title,'th_corr_matrix',headers,labels,corr,lh,8,4);
end end
end end
end end
@ -169,7 +169,7 @@ if options_.ar > 0 && size(stationary_vars, 1) > 0
labels = deblank(M_.endo_names_tex(ivar(i1),:)); labels = deblank(M_.endo_names_tex(ivar(i1),:));
headers=char('Order ',int2str([1:options_.ar]')); headers=char('Order ',int2str([1:options_.ar]'));
lh = size(labels,2)+2; lh = size(labels,2)+2;
dyn_latex_table(M_,title,'th_autocorr_matrix',headers,labels,z,lh,8,4); dyn_latex_table(M_,options_,title,'th_autocorr_matrix',headers,labels,z,lh,8,4);
end end
end end
end end

View File

@ -60,6 +60,6 @@ for i=1:length(Steps)
labels_TeX = deblank(M_.endo_names_tex(SubsetOfVariables,:)); labels_TeX = deblank(M_.endo_names_tex(SubsetOfVariables,:));
headers_TeX=char('',deblank(M_.exo_names_tex)); headers_TeX=char('',deblank(M_.exo_names_tex));
lh = size(labels_TeX,2)+2; lh = size(labels_TeX,2)+2;
dyn_latex_table(M_,[title,'; Period ' int2str(Steps(i))],['th_var_decomp_cond_h',int2str(Steps(i))],headers_TeX,labels_TeX,vardec_i,lh,8,2); dyn_latex_table(M_,options_,[title,'; Period ' int2str(Steps(i))],['th_var_decomp_cond_h',int2str(Steps(i))],headers_TeX,labels_TeX,vardec_i,lh,8,2);
end end
end end

View File

@ -1,4 +1,4 @@
function dyn_latex_table(M_,title,LaTeXtitle,headers,labels,values,label_width,val_width,val_precis,optional_header) function dyn_latex_table(M_,options_,title,LaTeXtitle,headers,labels,values,label_width,val_width,val_precis,optional_header)
%function dyn_latex_table(M_,title,LaTeXtitle,headers,labels,values,label_width,val_width,val_precis,optional_header) %function dyn_latex_table(M_,title,LaTeXtitle,headers,labels,values,label_width,val_width,val_precis,optional_header)
% Copyright (C) 2015-2016 Dynare Team % Copyright (C) 2015-2016 Dynare Team
@ -18,6 +18,10 @@ function dyn_latex_table(M_,title,LaTeXtitle,headers,labels,values,label_width,v
% You should have received a copy of the GNU General Public License % You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
if options_.noprint
return
end
OutputDirectoryName = CheckPath('Output',M_.dname); OutputDirectoryName = CheckPath('Output',M_.dname);
%% get width of label column %% get width of label column
@ -71,7 +75,7 @@ fprintf(fidTeX,['\\caption{',title,'}\\\\\n ']);
fprintf(fidTeX,['\\label{Table:',LaTeXtitle,'}\\\\\n']); fprintf(fidTeX,['\\label{Table:',LaTeXtitle,'}\\\\\n']);
fprintf(fidTeX,'\\toprule \n'); fprintf(fidTeX,'\\toprule \n');
if nargin==10 if nargin==11
for ii=1:size(optional_header,1) for ii=1:size(optional_header,1)
fprintf(fidTeX,'%s\n',optional_header{ii}); fprintf(fidTeX,'%s\n',optional_header{ii});
end end
@ -80,7 +84,7 @@ fprintf(fidTeX,header_string);
fprintf(fidTeX,'\\midrule \\endfirsthead \n'); fprintf(fidTeX,'\\midrule \\endfirsthead \n');
fprintf(fidTeX,'\\caption{(continued)}\\\\\n '); fprintf(fidTeX,'\\caption{(continued)}\\\\\n ');
fprintf(fidTeX,'\\toprule \\\\ \n'); fprintf(fidTeX,'\\toprule \\\\ \n');
if nargin==10 if nargin==11
for ii=1:size(optional_header,1) for ii=1:size(optional_header,1)
fprintf(fidTeX,'%s\n',optional_header{ii}); fprintf(fidTeX,'%s\n',optional_header{ii});
end end

View File

@ -113,7 +113,7 @@ if ~options_.noprint
labels = deblank(M_.exo_names_tex); labels = deblank(M_.exo_names_tex);
headers = char('Variables',labels); headers = char('Variables',labels);
lh = size(labels,2)+2; lh = size(labels,2)+2;
dyn_latex_table(M_,my_title,'covar_ex_shocks',headers,labels,M_.Sigma_e,lh,10,6); dyn_latex_table(M_,options_,my_title,'covar_ex_shocks',headers,labels,M_.Sigma_e,lh,10,6);
end end
if options_.partial_information if options_.partial_information
skipline() skipline()