Skip to content
Snippets Groups Projects
Commit 9208bcf0 authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

Modified harmonic mean: Transform hard-coded tolerance to parameter

parent 32872362
No related branches found
No related tags found
1 merge request!1680Modified harmonic mean: Transform hard-coded tolerance to parameter
......@@ -714,6 +714,9 @@ options_.convergence.geweke.geweke_interval=[0.2 0.5];
options_.convergence.rafterylewis.indicator=false;
options_.convergence.rafterylewis.qrs=[0.025 0.005 0.95];
%tolerance for Modified Harmonic Mean estimator
options_.marginal_data_density.harmonic_mean.tolerance = 0.01;
% Options for lmmcp solver
options_.lmmcp.status = false;
......
......@@ -100,7 +100,7 @@ while check_coverage
marginal(linee,:) = [p, lpost_mode-log(tmp/((TotalNumberOfMhDraws-TODROP)*nblck))];
warning(warning_old_state);
end
if abs((marginal(9,2)-marginal(1,2))/marginal(9,2)) > 0.01 || isinf(marginal(1,2))
if abs((marginal(9,2)-marginal(1,2))/marginal(9,2)) > options_.marginal_data_density.harmonic_mean.tolerance || isinf(marginal(1,2))
fprintf('\n')
if increase == 1
disp('Estimation::marginal density: The support of the weighting density function is not large enough...')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment