Verified Commit 0b491b3b authored by Johannes Pfeifer 's avatar Johannes Pfeifer Committed by Stéphane Adjemian
Browse files

Estimation: fix header column widths in display of results

parent 948e4e75
......@@ -63,7 +63,7 @@ clear record;
header_width = row_header_width(M_, estim_params_, bayestopt_);
hpd_interval=[num2str(options_.mh_conf_sig*100), '% HPD interval'];
tit2 = sprintf('%-*s %12s %12s %23s %8s %12s\n',header_width,' ','prior mean','post. mean',hpd_interval,'prior','pstdev');
pformat = '%-*s %12.3f % 12.4f %11.4f %11.4f %7s %12.4f';
pformat = '%-*s %12.3f % 12.4f %11.4f %11.4f %8s %12.4f';
skipline(2)
disp('ESTIMATION RESULTS')
......
......@@ -51,10 +51,10 @@ tstath = abs(xparam1)./stdh;
header_width = row_header_width(M_, estim_params_, bayestopt_);
if strcmp(field_name,'posterior')
tit1 = sprintf('%-*s %7s %8s %7s %4s %6s\n', header_width-2, ' ', 'prior mean', ...
tit1 = sprintf('%-*s %10s %8s %7s %6s %6s\n', header_width, ' ', 'prior mean', ...
'mode', 's.d.', 'prior', 'pstdev');
else
tit1 = sprintf('%-*s %10s %7s %6s\n', header_width-2, ' ', 'Estimate', 's.d.', 't-stat');
tit1 = sprintf('%-*s %10s %7s %6s\n', header_width, ' ', 'Estimate', 's.d.', 't-stat');
end
if np
ip = nvx+nvn+ncx+ncn+1;
......@@ -63,13 +63,13 @@ if np
for i=1:np
name = bayestopt_.name{ip};
if strcmp(field_name,'posterior')
fprintf('%-*s %7.3f %8.4f %7.4f %4s %6.4f \n', ...
fprintf('%-*s %10.4f %8.4f %7.4f %6s %6.4f \n', ...
header_width,name, ...
bayestopt_.p1(ip),xparam1(ip),stdh(ip), ...
pnames{bayestopt_.pshape(ip)+1}, ...
bayestopt_.p2(ip));
else
fprintf('%-*s %8.4f %7.4f %7.4f \n', ...
fprintf('%-*s %10.4f %7.4f %7.4f \n', ...
header_width, name, xparam1(ip), stdh(ip), tstath(ip));
end
eval(['oo_.' field_name '_mode.parameters.' name ' = xparam1(ip);']);
......@@ -86,12 +86,12 @@ if nvx
k = estim_params_.var_exo(i,1);
name = M_.exo_names{k};
if strcmp(field_name,'posterior')
fprintf('%-*s %7.3f %8.4f %7.4f %4s %6.4f \n', ...
fprintf('%-*s %10.4f %8.4f %7.4f %6s %6.4f \n', ...
header_width, name, bayestopt_.p1(ip), xparam1(ip), ...
stdh(ip), pnames{bayestopt_.pshape(ip)+1}, ...
bayestopt_.p2(ip));
else
fprintf('%-*s %8.4f %7.4f %7.4f \n', header_width, name, xparam1(ip), stdh(ip), tstath(ip));
fprintf('%-*s %10.4f %7.4f %7.4f \n', header_width, name, xparam1(ip), stdh(ip), tstath(ip));
end
M_.Sigma_e(k,k) = xparam1(ip)*xparam1(ip);
eval(['oo_.' field_name '_mode.shocks_std.' name ' = xparam1(ip);']);
......@@ -107,13 +107,13 @@ if nvn
for i=1:nvn
name = options_.varobs{estim_params_.nvn_observable_correspondence(i,1)};
if strcmp(field_name,'posterior')
fprintf('%-*s %7.3f %8.4f %7.4f %4s %6.4f \n', ...
fprintf('%-*s %10.4f %8.4f %7.4f %6s %6.4f \n', ...
header_width, name, bayestopt_.p1(ip), ...
xparam1(ip), stdh(ip), ...
pnames{bayestopt_.pshape(ip)+1}, ...
bayestopt_.p2(ip));
else
fprintf('%-*s %8.4f %7.4f %7.4f \n', header_width, name, xparam1(ip), ...
fprintf('%-*s %10.4f %7.4f %7.4f \n', header_width, name, xparam1(ip), ...
stdh(ip), tstath(ip))
end
eval(['oo_.' field_name '_mode.measurement_errors_std.' name ' = xparam1(ip);']);
......@@ -133,11 +133,11 @@ if ncx
name = sprintf('%s,%s', M_.exo_names{k1}, M_.exo_names{k2});
NAME = sprintf('%s_%s', M_.exo_names{k1}, M_.exo_names{k2});
if strcmp(field_name, 'posterior')
fprintf('%-*s %7.3f %8.4f %7.4f %4s %6.4f \n', ...
fprintf('%-*s %10.4f %8.4f %7.4f %6s %6.4f \n', ...
header_width, name, bayestopt_.p1(ip), xparam1(ip), stdh(ip), ...
pnames{bayestopt_.pshape(ip)+1}, bayestopt_.p2(ip));
else
fprintf('%-*s %8.4f %7.4f %7.4f \n', header_width,name, xparam1(ip), ...
fprintf('%-*s %10.4f %7.4f %7.4f \n', header_width,name, xparam1(ip), ...
stdh(ip), tstath(ip));
end
M_.Sigma_e(k1,k2) = xparam1(ip)*sqrt(M_.Sigma_e(k1,k1)*M_.Sigma_e(k2,k2));
......@@ -159,11 +159,11 @@ if ncn
name = sprintf('%s,%s', M_.endo_names{k1}, M_.endo_names{k2});
NAME = sprintf('%s_%s', M_.endo_names{k1}, M_.endo_names{k2});
if strcmp(field_name,'posterior')
fprintf('%-*s %7.3f %8.4f %7.4f %4s %6.4f \n', ...
fprintf('%-*s %10.4f %8.4f %7.4f %6s %6.4f \n', ...
header_width, name, bayestopt_.p1(ip), xparam1(ip), stdh(ip), ...
pnames{bayestopt_.pshape(ip)+1}, bayestopt_.p2(ip));
else
fprintf('%-*s %8.4f %7.4f %7.4f \n',header_width, name, xparam1(ip), ...
fprintf('%-*s %10.4f %7.4f %7.4f \n',header_width, name, xparam1(ip), ...
stdh(ip), tstath(ip));
end
eval(['oo_.' field_name '_mode.measurement_errors_corr.' NAME ' = xparam1(ip);']);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment