Commit 9208bcf0 authored by Johannes Pfeifer 's avatar Johannes Pfeifer

Modified harmonic mean: Transform hard-coded tolerance to parameter

Closes #1666
parent 32872362
Pipeline #2608 passed with stages
in 67 minutes and 49 seconds
......@@ -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...')
......
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