diff --git a/matlab/McMCDiagnostics.m b/matlab/McMCDiagnostics.m index 53bcef0bc..e3d146dab 100644 --- a/matlab/McMCDiagnostics.m +++ b/matlab/McMCDiagnostics.m @@ -105,7 +105,7 @@ dyntable(my_title,IFAC_header,param_name,Ifac',lh,12,3); skipline() 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 record.InefficiencyFactorsPerBlock = Ifac; 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); 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); - 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 skipline(2); return; diff --git a/matlab/disp_moments.m b/matlab/disp_moments.m index f8adb0fa6..0e4cff27c 100644 --- a/matlab/disp_moments.m +++ b/matlab/disp_moments.m @@ -73,7 +73,7 @@ if options_.nomoments == 0 'KURTOSIS'); dyntable(title,headers,labels,z,size(labels,2)+2,16,6); 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 @@ -92,7 +92,7 @@ if options_.nocorr == 0 if options_.TeX headers = char('VARIABLE',M_.endo_names_tex(ivar,:)); 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 @@ -116,7 +116,7 @@ if ar > 0 if options_.TeX headers = char('VARIABLE',int2str([1:ar]')); 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 @@ -165,7 +165,7 @@ if ~options_.nodecomposition headers = char(' ',headers); labels = deblank(M_.endo_names_tex(ivar,:)); 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 if options_.order == 1 diff --git a/matlab/disp_th_moments.m b/matlab/disp_th_moments.m index 35406a01f..0bc2902a0 100644 --- a/matlab/disp_th_moments.m +++ b/matlab/disp_th_moments.m @@ -70,7 +70,7 @@ if size(stationary_vars, 1) > 0 if options_.TeX labels = deblank(M_.endo_names_tex(ivar,:)); 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 if M_.exo_nbr > 1 && ~nodecomposition @@ -93,7 +93,7 @@ if size(stationary_vars, 1) > 0 headers = char(' ',headers); labels = deblank(M_.endo_names_tex(ivar(stationary_vars),:)); 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 @@ -143,7 +143,7 @@ if options_.nocorr == 0 && size(stationary_vars, 1) > 0 labels = deblank(M_.endo_names_tex(ivar(i1),:)); headers=char('Variables',labels); 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 @@ -169,7 +169,7 @@ if options_.ar > 0 && size(stationary_vars, 1) > 0 labels = deblank(M_.endo_names_tex(ivar(i1),:)); headers=char('Order ',int2str([1:options_.ar]')); 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 diff --git a/matlab/display_conditional_variance_decomposition.m b/matlab/display_conditional_variance_decomposition.m index 944469ef1..1fba7ffb2 100644 --- a/matlab/display_conditional_variance_decomposition.m +++ b/matlab/display_conditional_variance_decomposition.m @@ -60,6 +60,6 @@ for i=1:length(Steps) labels_TeX = deblank(M_.endo_names_tex(SubsetOfVariables,:)); headers_TeX=char('',deblank(M_.exo_names_tex)); 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 \ No newline at end of file diff --git a/matlab/dyn_latex_table.m b/matlab/dyn_latex_table.m index 29e6a961d..080b5ee31 100644 --- a/matlab/dyn_latex_table.m +++ b/matlab/dyn_latex_table.m @@ -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) % 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 % along with Dynare. If not, see . +if options_.noprint + return +end + OutputDirectoryName = CheckPath('Output',M_.dname); %% get width of label column @@ -71,7 +75,7 @@ fprintf(fidTeX,['\\caption{',title,'}\\\\\n ']); fprintf(fidTeX,['\\label{Table:',LaTeXtitle,'}\\\\\n']); fprintf(fidTeX,'\\toprule \n'); -if nargin==10 +if nargin==11 for ii=1:size(optional_header,1) fprintf(fidTeX,'%s\n',optional_header{ii}); end @@ -80,7 +84,7 @@ fprintf(fidTeX,header_string); fprintf(fidTeX,'\\midrule \\endfirsthead \n'); fprintf(fidTeX,'\\caption{(continued)}\\\\\n '); fprintf(fidTeX,'\\toprule \\\\ \n'); -if nargin==10 +if nargin==11 for ii=1:size(optional_header,1) fprintf(fidTeX,'%s\n',optional_header{ii}); end diff --git a/matlab/stoch_simul.m b/matlab/stoch_simul.m index 689ace5cd..586528e26 100644 --- a/matlab/stoch_simul.m +++ b/matlab/stoch_simul.m @@ -113,7 +113,7 @@ if ~options_.noprint labels = deblank(M_.exo_names_tex); headers = char('Variables',labels); 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 if options_.partial_information skipline()