Skip to content
Snippets Groups Projects
Verified Commit dac5a30a authored by Frédéric Karamé's avatar Frédéric Karamé Committed by Stéphane Adjemian
Browse files

online estimation: bug fixes for the coherency of functions calls.

parent 0b5062a9
No related branches found
No related tags found
No related merge requests found
...@@ -238,8 +238,11 @@ if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation & ...@@ -238,8 +238,11 @@ if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation &
optimizer_vec = [options_.mode_compute;num2cell(options_.additional_optimizer_steps)]; optimizer_vec = [options_.mode_compute;num2cell(options_.additional_optimizer_steps)];
for optim_iter = 1:length(optimizer_vec) for optim_iter = 1:length(optimizer_vec)
current_optimizer = optimizer_vec{optim_iter}; current_optimizer = optimizer_vec{optim_iter};
if current_optimizer~=11
[xparam1, fval, ~, hh, options_, Scale, new_rat_hess_info] = dynare_minimize_objective(objective_function,xparam1,current_optimizer,options_,[bounds.lb bounds.ub],bayestopt_.name,bayestopt_,hh,dataset_,dataset_info,options_,M_,estim_params_,bayestopt_,bounds,oo_.dr, oo_.steady_state,oo_.exo_steady_state,oo_.exo_det_steady_state); [xparam1, fval, ~, hh, options_, Scale, new_rat_hess_info] = dynare_minimize_objective(objective_function,xparam1,current_optimizer,options_,[bounds.lb bounds.ub],bayestopt_.name,bayestopt_,hh,dataset_,dataset_info,options_,M_,estim_params_,bayestopt_,bounds,oo_.dr, oo_.steady_state,oo_.exo_steady_state,oo_.exo_det_steady_state);
else
[xparam1, fval, ~, hh, options_, Scale, new_rat_hess_info] = dynare_minimize_objective(objective_function,xparam1,current_optimizer,options_,[bounds.lb bounds.ub],bayestopt_.name,bayestopt_,hh,dataset_,dataset_info,options_,M_,estim_params_,bayestopt_,bounds,oo_);
end
fprintf('\nFinal value of minus the log posterior (or likelihood):%f \n', fval); fprintf('\nFinal value of minus the log posterior (or likelihood):%f \n', fval);
if isnumeric(current_optimizer) if isnumeric(current_optimizer)
......
...@@ -86,7 +86,7 @@ for i=1:number_of_particles ...@@ -86,7 +86,7 @@ for i=1:number_of_particles
info = 12042009; info = 12042009;
while info while info
candidate = Prior.draw(); candidate = Prior.draw();
[info, M_, options_, oo_] = solve_model_for_online_filter(false, xparam1, dataset_, options_, M_, estim_params_, bayestopt_, bounds, oo_); [info, M_, options_, oo_] = solve_model_for_online_filter(false, candidate, dataset_, options_, M_, estim_params_, bayestopt_, bounds, oo_);
if ~info if ~info
xparam(:,i) = candidate(:); xparam(:,i) = candidate(:);
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment