Modularize display_estimation_results_table.m
parent
df4bc5c5c8
commit
aafa3e15b9
|
@ -179,24 +179,7 @@ if any(bayestopt_.pshape > 0) && options_.TeX %% Bayesian estimation (posterior
|
|||
if np
|
||||
filename = [OutputDirectoryName '/' M_.fname '_Posterior_Mode_1.TeX'];
|
||||
fidTeX = fopen(filename,'w');
|
||||
fprintf(fidTeX,'%% TeX-table generated by dynare_estimation (Dynare).\n');
|
||||
fprintf(fidTeX,'%% RESULTS FROM POSTERIOR MAXIMIZATION (parameters)\n');
|
||||
fprintf(fidTeX,['%% ' datestr(now,0)]);
|
||||
fprintf(fidTeX,' \n');
|
||||
fprintf(fidTeX,' \n');
|
||||
fprintf(fidTeX,'\\begin{center}\n');
|
||||
fprintf(fidTeX,'\\begin{longtable}{l|lcccc} \n');
|
||||
fprintf(fidTeX,'\\caption{Results from posterior maximization (parameters)}\\\\\n ');
|
||||
fprintf(fidTeX,'\\label{Table:Posterior:1}\\\\\n');
|
||||
fprintf(fidTeX,'\\hline\\hline \\\\ \n');
|
||||
fprintf(fidTeX,' & Prior distribution & Prior mean & Prior s.d. & Posterior mode & s.d. \\\\ \n');
|
||||
fprintf(fidTeX,'\\hline \\endfirsthead \n');
|
||||
fprintf(fidTeX,'\\caption{(continued)}\\\\\n ');
|
||||
fprintf(fidTeX,'\\hline\\hline \\\\ \n');
|
||||
fprintf(fidTeX,' & Prior distribution & Prior mean & Prior s.d. & Posterior mode & s.d. \\\\ \n');
|
||||
fprintf(fidTeX,'\\hline \\endhead \n');
|
||||
fprintf(fidTeX,'\\hline \\multicolumn{6}{r}{(Continued on next page)} \\\\ \\hline \\endfoot \n');
|
||||
fprintf(fidTeX,'\\hline \\hline \\endlastfoot \n');
|
||||
TeXBegin_Bayesian(fidTeX,1,'parameters')
|
||||
ip = nvx+nvn+ncx+ncn+1;
|
||||
for i=1:np
|
||||
fprintf(fidTeX,'$%s$ & %s & %7.3f & %6.4f & %8.4f & %7.4f \\\\ \n',...
|
||||
|
@ -208,33 +191,12 @@ if any(bayestopt_.pshape > 0) && options_.TeX %% Bayesian estimation (posterior
|
|||
stdh(ip));
|
||||
ip = ip + 1;
|
||||
end
|
||||
fprintf(fidTeX,'\\end{longtable}\n ');
|
||||
fprintf(fidTeX,'\\end{center}\n');
|
||||
fprintf(fidTeX,'%% End of TeX file.\n');
|
||||
fclose(fidTeX);
|
||||
TeXEnd(fidTeX)
|
||||
end
|
||||
if nvx
|
||||
TeXfile = [OutputDirectoryName '/' M_.fname '_Posterior_Mode_2.TeX'];
|
||||
fidTeX = fopen(TeXfile,'w');
|
||||
fprintf(fidTeX,'%% TeX-table generated by dynare_estimation (Dynare).\n');
|
||||
fprintf(fidTeX,'%% RESULTS FROM POSTERIOR MAXIMIZATION (standard deviation of structural shocks)\n');
|
||||
fprintf(fidTeX,['%% ' datestr(now,0)]);
|
||||
fprintf(fidTeX,' \n');
|
||||
fprintf(fidTeX,' \n');
|
||||
fprintf(fidTeX,'\\begin{center}\n');
|
||||
fprintf(fidTeX,'\\begin{longtable}{l|lcccc} \n');
|
||||
fprintf(fidTeX,'\\caption{Results from posterior maximization (standard deviation of structural shocks)}\\\\\n ');
|
||||
fprintf(fidTeX,'\\label{Table:Posterior:2}\\\\\n');
|
||||
fprintf(fidTeX,'\\hline\\hline \\\\ \n');
|
||||
fprintf(fidTeX,' & Prior distribution & Prior mean & Prior s.d. & Posterior mode & s.d. \\\\ \n');
|
||||
fprintf(fidTeX,'\\hline \\endfirsthead \n');
|
||||
fprintf(fidTeX,'\\caption{(continued)}\\\\\n ');
|
||||
fprintf(fidTeX,'\\label{Table:Posterior:2}\\\\\n');
|
||||
fprintf(fidTeX,'\\hline\\hline \\\\ \n');
|
||||
fprintf(fidTeX,' & Prior distribution & Prior mean & Prior s.d. & Posterior mode & s.d. \\\\ \n');
|
||||
fprintf(fidTeX,'\\hline \\endhead \n');
|
||||
fprintf(fidTeX,'\\hline \\multicolumn{6}{r}{(Continued on next page)} \\\\ \\hline \\endfoot \n');
|
||||
fprintf(fidTeX,'\\hline \\hline \\endlastfoot \n');
|
||||
TeXBegin_Bayesian(fidTeX,2,'standard deviation of structural shocks')
|
||||
ip = 1;
|
||||
for i=1:nvx
|
||||
k = estim_params_.var_exo(i,1);
|
||||
|
@ -247,33 +209,12 @@ if any(bayestopt_.pshape > 0) && options_.TeX %% Bayesian estimation (posterior
|
|||
stdh(ip));
|
||||
ip = ip+1;
|
||||
end
|
||||
fprintf(fidTeX,'\\end{longtable}\n ');
|
||||
fprintf(fidTeX,'\\end{center}\n');
|
||||
fprintf(fidTeX,'%% End of TeX file.\n');
|
||||
fclose(fidTeX);
|
||||
TeXEnd(fidTeX)
|
||||
end
|
||||
if nvn
|
||||
TeXfile = [OutputDirectoryName '/' M_.fname '_Posterior_Mode_3.TeX'];
|
||||
fidTeX = fopen(TeXfile,'w');
|
||||
fprintf(fidTeX,'%% TeX-table generated by dynare_estimation (Dynare).\n');
|
||||
fprintf(fidTeX,'%% RESULTS FROM POSTERIOR MAXIMIZATION (standard deviation of measurement errors)\n');
|
||||
fprintf(fidTeX,['%% ' datestr(now,0)]);
|
||||
fprintf(fidTeX,' \n');
|
||||
fprintf(fidTeX,' \n');
|
||||
fprintf(fidTeX,'\\begin{center}\n');
|
||||
fprintf(fidTeX,'\\begin{longtable}{l|lcccc} \n');
|
||||
fprintf(fidTeX,'\\caption{Results from posterior maximization (standard deviation of measurement errors)}\\\\\n ');
|
||||
fprintf(fidTeX,'\\label{Table:Posterior:3}\\\\\n');
|
||||
fprintf(fidTeX,'\\hline\\hline \\\\ \n');
|
||||
fprintf(fidTeX,' & Prior distribution & Prior mean & Prior s.d. & Posterior mode & s.d. \\\\ \n');
|
||||
fprintf(fidTeX,'\\hline \\endfirsthead \n');
|
||||
fprintf(fidTeX,'\\caption{(continued)}\\\\\n ');
|
||||
fprintf(fidTeX,'\\label{Table:Posterior:3}\\\\\n');
|
||||
fprintf(fidTeX,'\\hline\\hline \\\\ \n');
|
||||
fprintf(fidTeX,' & Prior distribution & Prior mean & Prior s.d. & Posterior mode & s.d. \\\\ \n');
|
||||
fprintf(fidTeX,'\\hline \\endhead \n');
|
||||
fprintf(fidTeX,'\\hline \\multicolumn{6}{r}{(Continued on next page)} \\\\ \\hline \\endfoot \n');
|
||||
fprintf(fidTeX,'\\hline \\hline \\endlastfoot \n');
|
||||
TeXBegin_Bayesian(fidTeX,3,'standard deviation of measurement errors')
|
||||
ip = nvx+1;
|
||||
for i=1:nvn
|
||||
idx = strmatch(options_.varobs{estim_params_.nvn_observable_correspondence(i,1)},M_.endo_names);
|
||||
|
@ -286,33 +227,12 @@ if any(bayestopt_.pshape > 0) && options_.TeX %% Bayesian estimation (posterior
|
|||
stdh(ip));
|
||||
ip = ip+1;
|
||||
end
|
||||
fprintf(fidTeX,'\\end{longtable}\n ');
|
||||
fprintf(fidTeX,'\\end{center}\n');
|
||||
fprintf(fidTeX,'%% End of TeX file.\n');
|
||||
fclose(fidTeX);
|
||||
TeXEnd(fidTeX)
|
||||
end
|
||||
if ncx
|
||||
TeXfile = [OutputDirectoryName '/' M_.fname '_Posterior_Mode_4.TeX'];
|
||||
fidTeX = fopen(TeXfile,'w');
|
||||
fprintf(fidTeX,'%% TeX-table generated by dynare_estimation (Dynare).\n');
|
||||
fprintf(fidTeX,'%% RESULTS FROM POSTERIOR MAXIMIZATION (correlation of structural shocks)\n');
|
||||
fprintf(fidTeX,['%% ' datestr(now,0)]);
|
||||
fprintf(fidTeX,' \n');
|
||||
fprintf(fidTeX,' \n');
|
||||
fprintf(fidTeX,'\\begin{center}\n');
|
||||
fprintf(fidTeX,'\\begin{longtable}{l|lcccc} \n');
|
||||
fprintf(fidTeX,'\\caption{Results from posterior parameters (correlation of structural shocks)}\\\\\n ');
|
||||
fprintf(fidTeX,'\\label{Table:Posterior:4}\\\\\n');
|
||||
fprintf(fidTeX,'\\hline\\hline \\\\ \n');
|
||||
fprintf(fidTeX,' & Prior distribution & Prior mean & Prior s.d. & Posterior mode & s.d. \\\\ \n');
|
||||
fprintf(fidTeX,'\\hline \\endfirsthead \n');
|
||||
fprintf(fidTeX,'\\caption{(continued)}\\\\\n ');
|
||||
fprintf(fidTeX,'\\label{Table:Posterior:4}\\\\\n');
|
||||
fprintf(fidTeX,'\\hline\\hline \\\\ \n');
|
||||
fprintf(fidTeX,' & Prior distribution & Prior mean & Prior s.d. & Posterior mode & s.d. \\\\ \n');
|
||||
fprintf(fidTeX,'\\hline \\endhead \n');
|
||||
fprintf(fidTeX,'\\hline \\multicolumn{6}{r}{(Continued on next page)} \\\\ \\hline \\endfoot \n');
|
||||
fprintf(fidTeX,'\\hline \\hline \\endlastfoot \n');
|
||||
TeXBegin_Bayesian(fidTeX,4,'correlation of structural shocks')
|
||||
ip = nvx+nvn+1;
|
||||
for i=1:ncx
|
||||
k1 = estim_params_.corrx(i,1);
|
||||
|
@ -326,33 +246,12 @@ if any(bayestopt_.pshape > 0) && options_.TeX %% Bayesian estimation (posterior
|
|||
stdh(ip));
|
||||
ip = ip+1;
|
||||
end
|
||||
fprintf(fidTeX,'\\end{longtable}\n ');
|
||||
fprintf(fidTeX,'\\end{center}\n');
|
||||
fprintf(fidTeX,'%% End of TeX file.\n');
|
||||
fclose(fidTeX);
|
||||
TeXEnd(fidTeX)
|
||||
end
|
||||
if ncn
|
||||
TeXfile = [OutputDirectoryName '/' M_.fname '_Posterior_Mode_5.TeX'];
|
||||
fidTeX = fopen(TeXfile,'w');
|
||||
fprintf(fidTeX,'%% TeX-table generated by dynare_estimation (Dynare).\n');
|
||||
fprintf(fidTeX,'%% RESULTS FROM POSTERIOR MAXIMIZATION (correlation of measurement errors)\n');
|
||||
fprintf(fidTeX,['%% ' datestr(now,0)]);
|
||||
fprintf(fidTeX,' \n');
|
||||
fprintf(fidTeX,' \n');
|
||||
fprintf(fidTeX,'\\begin{center}\n');
|
||||
fprintf(fidTeX,'\\begin{longtable}{l|lcccc} \n');
|
||||
fprintf(fidTeX,'\\caption{Results from posterior parameters (correlation of measurement errors)}\\\\\n ');
|
||||
fprintf(fidTeX,'\\label{Table:Posterior:5}\\\\\n');
|
||||
fprintf(fidTeX,'\\hline\\hline \\\\ \n');
|
||||
fprintf(fidTeX,' & Prior distribution & Prior mean & Prior s.d. & Posterior mode & s.d. \\\\ \n');
|
||||
fprintf(fidTeX,'\\hline \\endfirsthead \n');
|
||||
fprintf(fidTeX,'\\caption{(continued)}\\\\\n ');
|
||||
fprintf(fidTeX,'\\label{Table:Posterior:5}\\\\\n');
|
||||
fprintf(fidTeX,'\\hline\\hline \\\\ \n');
|
||||
fprintf(fidTeX,' & Prior distribution & Prior mean & Prior s.d. & Posterior mode & s.d. \\\\ \n');
|
||||
fprintf(fidTeX,'\\hline \\endhead \n');
|
||||
fprintf(fidTeX,'\\hline \\multicolumn{6}{r}{(Continued on next page)} \\\\ \\hline \\endfoot \n');
|
||||
fprintf(fidTeX,'\\hline \\hline \\endlastfoot \n');
|
||||
TeXBegin_Bayesian(fidTeX,5,'correlation of measurement errors')
|
||||
ip = nvx+nvn+ncx+1;
|
||||
for i=1:ncn
|
||||
k1 = estim_params_.corrn(i,1);
|
||||
|
@ -366,34 +265,13 @@ if any(bayestopt_.pshape > 0) && options_.TeX %% Bayesian estimation (posterior
|
|||
stdh(ip));
|
||||
ip = ip+1;
|
||||
end
|
||||
fprintf(fidTeX,'\\end{longtable}\n ');
|
||||
fprintf(fidTeX,'\\end{center}\n');
|
||||
fprintf(fidTeX,'%% End of TeX file.\n');
|
||||
fclose(fidTeX);
|
||||
TeXEnd(fidTeX)
|
||||
end
|
||||
elseif all(bayestopt_.pshape == 0) && options_.TeX %% MLE and GMM Latex output
|
||||
if np
|
||||
filename = [OutputDirectoryName '/' M_.fname '_' LaTeXtitle '_Mode_1.TeX'];
|
||||
fidTeX = fopen(filename,'w');
|
||||
fprintf(fidTeX,'%% TeX-table generated by dynare_estimation (Dynare).\n');
|
||||
fprintf(fidTeX,['%% RESULTS FROM ' table_title ' MAXIMIZATION (parameters)\n']);
|
||||
fprintf(fidTeX,['%% ' datestr(now,0)]);
|
||||
fprintf(fidTeX,' \n');
|
||||
fprintf(fidTeX,' \n');
|
||||
fprintf(fidTeX,'\\begin{center}\n');
|
||||
fprintf(fidTeX,'\\begin{longtable}{l|lcc} \n');
|
||||
fprintf(fidTeX,['\\caption{Results from ' table_title ' maximization (parameters)}\\\\\n ']);
|
||||
fprintf(fidTeX,['\\label{Table:' LaTeXtitle ':1}\\\\\n']);
|
||||
fprintf(fidTeX,'\\hline\\hline \\\\ \n');
|
||||
fprintf(fidTeX,' & Mode & s.d. & t-stat\\\\ \n');
|
||||
fprintf(fidTeX,'\\hline \\endfirsthead \n');
|
||||
fprintf(fidTeX,'\\caption{(continued)}\\\\\n ');
|
||||
fprintf(fidTeX,['\\label{Table:' LaTeXtitle ':1}\\\\\n']);
|
||||
fprintf(fidTeX,'\\hline\\hline \\\\ \n');
|
||||
fprintf(fidTeX,' & Mode & s.d. & t-stat\\\\ \n');
|
||||
fprintf(fidTeX,'\\hline \\endhead \n');
|
||||
fprintf(fidTeX,'\\hline \\multicolumn{4}{r}{(Continued on next page)} \\\\ \\hline \\endfoot \n');
|
||||
fprintf(fidTeX,'\\hline \\hline \\endlastfoot \n');
|
||||
TeXBegin_ML(fidTeX,1,'parameters',table_title,LaTeXtitle)
|
||||
ip = nvx+nvn+ncx+ncn+1;
|
||||
for i=1:np
|
||||
fprintf(fidTeX,'$%s$ & %8.4f & %7.4f & %7.4f\\\\ \n',...
|
||||
|
@ -403,33 +281,12 @@ elseif all(bayestopt_.pshape == 0) && options_.TeX %% MLE and GMM Latex output
|
|||
tstath(ip));
|
||||
ip = ip + 1;
|
||||
end
|
||||
fprintf(fidTeX,'\\end{longtable}\n ');
|
||||
fprintf(fidTeX,'\\end{center}\n');
|
||||
fprintf(fidTeX,'%% End of TeX file.\n');
|
||||
fclose(fidTeX);
|
||||
TeXEnd(fidTeX)
|
||||
end
|
||||
if nvx
|
||||
filename = [OutputDirectoryName '/' M_.fname '_' LaTeXtitle '_Mode_2.TeX'];
|
||||
fidTeX = fopen(filename,'w');
|
||||
fprintf(fidTeX,'%% TeX-table generated by dynare_estimation (Dynare).\n');
|
||||
fprintf(fidTeX,['%% RESULTS FROM ' table_title ' MAXIMIZATION (standard deviation of structural shocks)\n']);
|
||||
fprintf(fidTeX,['%% ' datestr(now,0)]);
|
||||
fprintf(fidTeX,' \n');
|
||||
fprintf(fidTeX,' \n');
|
||||
fprintf(fidTeX,'\\begin{center}\n');
|
||||
fprintf(fidTeX,'\\begin{longtable}{l|lcc} \n');
|
||||
fprintf(fidTeX,['\\caption{Results from ' table_title ' maximization (standard deviation of structural shocks)}\\\\\n ']);
|
||||
fprintf(fidTeX,['\\label{Table:' LaTeXtitle ':2}\\\\\n']);
|
||||
fprintf(fidTeX,'\\hline\\hline \\\\ \n');
|
||||
fprintf(fidTeX,' & Mode & s.d. & t-stat\\\\ \n');
|
||||
fprintf(fidTeX,'\\hline \\endfirsthead \n');
|
||||
fprintf(fidTeX,'\\caption{(continued)}\\\\\n ');
|
||||
fprintf(fidTeX,['\\label{Table:' LaTeXtitle ':2}\\\\\n']);
|
||||
fprintf(fidTeX,'\\hline\\hline \\\\ \n');
|
||||
fprintf(fidTeX,' & Mode & s.d. & t-stat\\\\ \n');
|
||||
fprintf(fidTeX,'\\hline \\endhead \n');
|
||||
fprintf(fidTeX,'\\hline \\multicolumn{4}{r}{(Continued on next page)} \\\\ \\hline \\endfoot \n');
|
||||
fprintf(fidTeX,'\\hline \\hline \\endlastfoot \n');
|
||||
TeXBegin_ML(fidTeX,2,'standard deviation of structural shocks',table_title,LaTeXtitle)
|
||||
ip = 1;
|
||||
for i=1:nvx
|
||||
k = estim_params_.var_exo(i,1);
|
||||
|
@ -440,33 +297,12 @@ elseif all(bayestopt_.pshape == 0) && options_.TeX %% MLE and GMM Latex output
|
|||
tstath(ip));
|
||||
ip = ip+1;
|
||||
end
|
||||
fprintf(fidTeX,'\\end{longtable}\n ');
|
||||
fprintf(fidTeX,'\\end{center}\n');
|
||||
fprintf(fidTeX,'%% End of TeX file.\n');
|
||||
fclose(fidTeX);
|
||||
TeXEnd(fidTeX)
|
||||
end
|
||||
if nvn
|
||||
filename = [OutputDirectoryName '/' M_.fname '_' LaTeXtitle '_Mode_3.TeX'];
|
||||
fidTeX = fopen(filename,'w');
|
||||
fprintf(fidTeX,'%% TeX-table generated by dynare_estimation (Dynare).\n');
|
||||
fprintf(fidTeX,['%% RESULTS FROM ' table_title ' MAXIMIZATION (standard deviation of measurement errors)\n']);
|
||||
fprintf(fidTeX,['%% ' datestr(now,0)]);
|
||||
fprintf(fidTeX,' \n');
|
||||
fprintf(fidTeX,' \n');
|
||||
fprintf(fidTeX,'\\begin{center}\n');
|
||||
fprintf(fidTeX,'\\begin{longtable}{l|lcc} \n');
|
||||
fprintf(fidTeX,['\\caption{Results from ' table_title ' maximization (standard deviation of measurement errors)}\\\\\n ']);
|
||||
fprintf(fidTeX,['\\label{Table:' LaTeXtitle ':3}\\\\\n']);
|
||||
fprintf(fidTeX,'\\hline\\hline \\\\ \n');
|
||||
fprintf(fidTeX,' & Mode & s.d. & t-stat\\\\ \n');
|
||||
fprintf(fidTeX,'\\hline \\endfirsthead \n');
|
||||
fprintf(fidTeX,'\\caption{(continued)}\\\\\n ');
|
||||
fprintf(fidTeX,['\\label{Table:' LaTeXtitle ':3}\\\\\n']);
|
||||
fprintf(fidTeX,'\\hline\\hline \\\\ \n');
|
||||
fprintf(fidTeX,' & Mode & s.d. & t-stat\\\\ \n');
|
||||
fprintf(fidTeX,'\\hline \\endhead \n');
|
||||
fprintf(fidTeX,'\\hline \\multicolumn{4}{r}{(Continued on next page)} \\\\ \\hline \\endfoot \n');
|
||||
fprintf(fidTeX,'\\hline \\hline \\endlastfoot \n');
|
||||
TeXBegin_ML(fidTeX,3,'standard deviation of measurement errors',table_title,LaTeXtitle)
|
||||
ip = nvx+1;
|
||||
for i=1:nvn
|
||||
idx = strmatch(options_.varobs{estim_params_.nvn_observable_correspondence(i,1)},M_.endo_names);
|
||||
|
@ -477,33 +313,12 @@ elseif all(bayestopt_.pshape == 0) && options_.TeX %% MLE and GMM Latex output
|
|||
tstath(ip));
|
||||
ip = ip+1;
|
||||
end
|
||||
fprintf(fidTeX,'\\end{longtable}\n ');
|
||||
fprintf(fidTeX,'\\end{center}\n');
|
||||
fprintf(fidTeX,'%% End of TeX file.\n');
|
||||
fclose(fidTeX);
|
||||
TeXEnd(fidTeX)
|
||||
end
|
||||
if ncx
|
||||
filename = [OutputDirectoryName '/' M_.fname '_' LaTeXtitle '_Mode_4.TeX'];
|
||||
fidTeX = fopen(filename,'w');
|
||||
fprintf(fidTeX,'%% TeX-table generated by dynare_estimation (Dynare).\n');
|
||||
fprintf(fidTeX,['%% RESULTS FROM ' table_title ' MAXIMIZATION (correlation of structural shocks)\n']);
|
||||
fprintf(fidTeX,['%% ' datestr(now,0)]);
|
||||
fprintf(fidTeX,' \n');
|
||||
fprintf(fidTeX,' \n');
|
||||
fprintf(fidTeX,'\\begin{center}\n');
|
||||
fprintf(fidTeX,'\\begin{longtable}{l|lcc} \n');
|
||||
fprintf(fidTeX,['\\caption{Results from ' table_title ' maximization (correlation of structural shocks)}\\\\\n ']);
|
||||
fprintf(fidTeX,['\\label{Table:' LaTeXtitle ':4}\\\\\n']);
|
||||
fprintf(fidTeX,'\\hline\\hline \\\\ \n');
|
||||
fprintf(fidTeX,' & Mode & s.d. & t-stat\\\\ \n');
|
||||
fprintf(fidTeX,'\\hline \\endfirsthead \n');
|
||||
fprintf(fidTeX,'\\caption{(continued)}\\\\\n ');
|
||||
fprintf(fidTeX,['\\label{Table:' LaTeXtitle ':4}\\\\\n']);
|
||||
fprintf(fidTeX,'\\hline\\hline \\\\ \n');
|
||||
fprintf(fidTeX,' & Mode & s.d. & t-stat\\\\ \n');
|
||||
fprintf(fidTeX,'\\hline \\endhead \n');
|
||||
fprintf(fidTeX,'\\hline \\multicolumn{4}{r}{(Continued on next page)} \\\\ \\hline \\endfoot \n');
|
||||
fprintf(fidTeX,'\\hline \\hline \\endlastfoot \n');
|
||||
TeXBegin_ML(fidTeX,4,'correlation of structural shocks',table_title,LaTeXtitle)
|
||||
ip = nvx+nvn+1;
|
||||
for i=1:ncx
|
||||
k1 = estim_params_.corrx(i,1);
|
||||
|
@ -515,33 +330,12 @@ elseif all(bayestopt_.pshape == 0) && options_.TeX %% MLE and GMM Latex output
|
|||
tstath(ip));
|
||||
ip = ip+1;
|
||||
end
|
||||
fprintf(fidTeX,'\\end{longtable}\n ');
|
||||
fprintf(fidTeX,'\\end{center}\n');
|
||||
fprintf(fidTeX,'%% End of TeX file.\n');
|
||||
fclose(fidTeX);
|
||||
TeXEnd(fidTeX)
|
||||
end
|
||||
if ncn
|
||||
filename = [OutputDirectoryName '/' M_.fname '_' LaTeXtitle '_Mode_5.TeX'];
|
||||
fidTeX = fopen(filename,'w');
|
||||
fprintf(fidTeX,'%% TeX-table generated by dynare_estimation (Dynare).\n');
|
||||
fprintf(fidTeX,['%% RESULTS FROM ' table_title ' MAXIMIZATION (correlation of measurement errors)\n']);
|
||||
fprintf(fidTeX,['%% ' datestr(now,0)]);
|
||||
fprintf(fidTeX,' \n');
|
||||
fprintf(fidTeX,' \n');
|
||||
fprintf(fidTeX,'\\begin{center}\n');
|
||||
fprintf(fidTeX,'\\begin{longtable}{l|lcc} \n');
|
||||
fprintf(fidTeX,['\\caption{Results from ' table_title ' maximization (correlation of measurement errors)}\\\\\n ']);
|
||||
fprintf(fidTeX,['\\label{Table:' LaTeXtitle ':5}\\\\\n']);
|
||||
fprintf(fidTeX,'\\hline\\hline \\\\ \n');
|
||||
fprintf(fidTeX,' & Mode & s.d. & t-stat\\\\ \n');
|
||||
fprintf(fidTeX,'\\hline \\endfirsthead \n');
|
||||
fprintf(fidTeX,'\\caption{(continued)}\\\\\n ');
|
||||
fprintf(fidTeX,['\\label{Table:' LaTeXtitle ':5}\\\\\n']);
|
||||
fprintf(fidTeX,'\\hline\\hline \\\\ \n');
|
||||
fprintf(fidTeX,' & Mode & s.d. & t-stat\\\\ \n');
|
||||
fprintf(fidTeX,'\\hline \\endhead \n');
|
||||
fprintf(fidTeX,'\\hline \\multicolumn{4}{r}{(Continued on next page)} \\\\ \\hline \\endfoot \n');
|
||||
fprintf(fidTeX,'\\hline \\hline \\endlastfoot \n');
|
||||
TeXBegin_ML(fidTeX,5,'correlation of measurement errors',table_title,LaTeXtitle)
|
||||
ip = nvx+nvn+ncx+1;
|
||||
for i=1:ncn
|
||||
k1 = estim_params_.corrn(i,1);
|
||||
|
@ -553,10 +347,60 @@ elseif all(bayestopt_.pshape == 0) && options_.TeX %% MLE and GMM Latex output
|
|||
tstath(ip));
|
||||
ip = ip+1;
|
||||
end
|
||||
fprintf(fidTeX,'\\end{longtable}\n ');
|
||||
fprintf(fidTeX,'\\end{center}\n');
|
||||
fprintf(fidTeX,'%% End of TeX file.\n');
|
||||
fclose(fidTeX);
|
||||
end
|
||||
|
||||
TeXEnd(fidTeX)
|
||||
end
|
||||
|
||||
|
||||
|
||||
%% subfunctions:
|
||||
%
|
||||
function TeXBegin_Bayesian(fid,fnum,title)
|
||||
fprintf(fid,'%% TeX-table generated by dynare_estimation (Dynare).\n');
|
||||
fprintf(fid,['%% RESULTS FROM POSTERIOR MAXIMIZATION (' title ')\n']);
|
||||
fprintf(fid,['%% ' datestr(now,0)]);
|
||||
fprintf(fid,' \n');
|
||||
fprintf(fid,' \n');
|
||||
fprintf(fid,'\\begin{center}\n');
|
||||
fprintf(fid,'\\begin{longtable}{llcccc} \n');
|
||||
fprintf(fid,['\\caption{Results from posterior maximization (' title ')}\\\\\n ']);
|
||||
fprintf(fid,['\\label{Table:Posterior:' int2str(fnum) '}\\\\\n']);
|
||||
fprintf(fid,'\\toprule \n');
|
||||
fprintf(fid,' & \\multicolumn{3}{c}{Prior} & \\multicolumn{2}{c}{Posterior} \\\\\n');
|
||||
fprintf(fid,' \\cmidrule(r{.75em}){2-4} \\cmidrule(r{.75em}){5-6}\n');
|
||||
fprintf(fid,' & Dist. & Mean & Stdev & Mode & Stdev \\\\ \n');
|
||||
fprintf(fid,'\\midrule \\endfirsthead \n');
|
||||
fprintf(fid,'\\caption{(continued)}\\\\\n ');
|
||||
fprintf(fid,'\\bottomrule \n');
|
||||
fprintf(fid,' & \\multicolumn{3}{c}{Prior} & \\multicolumn{2}{c}{Posterior} \\\\\n');
|
||||
fprintf(fid,' \\cmidrule(r{.75em}){2-4} \\cmidrule(r{.75em}){5-6}\n');
|
||||
fprintf(fid,' & Dist. & Mean & Stdev & Mode & Stdev \\\\ \n');
|
||||
fprintf(fid,'\\midrule \\endhead \n');
|
||||
fprintf(fid,'\\bottomrule \\multicolumn{6}{r}{(Continued on next page)}\\endfoot \n');
|
||||
fprintf(fid,'\\bottomrule\\endlastfoot \n');
|
||||
|
||||
function TeXBegin_ML(fid,fnum,title,table_title,LaTeXtitle)
|
||||
fprintf(fid,'%% TeX-table generated by dynare_estimation (Dynare).\n');
|
||||
fprintf(fid,['%% RESULTS FROM ' table_title ' MAXIMIZATION (' title ')\n']);
|
||||
fprintf(fid,['%% ' datestr(now,0)]);
|
||||
fprintf(fid,' \n');
|
||||
fprintf(fid,' \n');
|
||||
fprintf(fid,'\\begin{center}\n');
|
||||
fprintf(fid,'\\begin{longtable}{llcc} \n');
|
||||
fprintf(fid,['\\caption{Results from ' table_title ' maximization (' title ')}\\\\\n ']);
|
||||
fprintf(fid,['\\label{Table:' LaTeXtitle ':' int2str(fnum) '}\\\\\n']);
|
||||
fprintf(fid,'\\toprule \n');
|
||||
fprintf(fid,' & Mode & s.d. & t-stat\\\\ \n');
|
||||
fprintf(fid,'\\midrule \\endfirsthead \n');
|
||||
fprintf(fid,'\\caption{(continued)}\\\\\n ');
|
||||
fprintf(fid,'\\toprule \n');
|
||||
fprintf(fid,' & Mode & s.d. & t-stat\\\\ \n');
|
||||
fprintf(fid,'\\midrule \\endhead \n');
|
||||
fprintf(fid,'\\bottomrule \\multicolumn{4}{r}{(Continued on next page)} \\endfoot \n');
|
||||
fprintf(fid,'\\bottomrule \\endlastfoot \n');
|
||||
|
||||
function TeXEnd(fid)
|
||||
fprintf(fid,'\\end{longtable}\n ');
|
||||
fprintf(fid,'\\end{center}\n');
|
||||
fprintf(fid,'%% End of TeX file.\n');
|
||||
fclose(fid);
|
Loading…
Reference in New Issue