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

mh_tune_jscale: fix display of stepsize and provide warning if no updating can occur.

parent f5c5b05f
Branches
No related tags found
No related merge requests found
......@@ -73,7 +73,7 @@ while j<=options.maxiter
prtfrc = j/options.maxiter;
% Update the waitbar
if ~mod(j, 10)
dyn_waitbar(prtfrc, hh, sprintf('Acceptance ratio [during last 500]: %f [%f]', isux/j, jsux/jj));
dyn_waitbar(prtfrc, hh, sprintf('Acceptance ratio [during last %u]: %f [%f]', options.stepsize, isux/j, jsux/jj));
end
% Adjust the value of the scale parameter.
if ~mod(j, options.stepsize)
......
......@@ -290,6 +290,10 @@ if ~isequal(DynareOptions.mode_compute,11)
disp(['Initial value of the log posterior (or likelihood): ' num2str(-fval)]);
end
if DynareOptions.mh_tune_jscale.status && (DynareOptions.mh_tune_jscale.maxiter<DynareOptions.mh_tune_jscale.stepsize)
warning('You specified mh_tune_jscale, but the maximum number of iterations is smaller than the step size. No update will take place.')
end
function evaluate_expression(expression,M_,oo_)
% function evaluate_expression(expression,M_,oo_)
%evaluates expressions relying on M_ and oo_ having their original names
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment