diff --git a/matlab/dynare_estimation_1.m b/matlab/dynare_estimation_1.m index c9d7468fcd937d42562b0a8f8a3c338934c01054..69169f7d6204917b1929d46ae2b4793c647d074d 100644 --- a/matlab/dynare_estimation_1.m +++ b/matlab/dynare_estimation_1.m @@ -12,7 +12,7 @@ function dynare_estimation_1(var_list_,dname) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2003-2013 Dynare Team +% Copyright (C) 2003-2015 Dynare Team % % This file is part of Dynare. % @@ -271,7 +271,7 @@ if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation end end - [xparam1, fval, exitflag, hh, options_, Scale] = dynare_minimize_objective(xparam1,options_.mode_compute,objective_function,options_,[bounds.lb bounds.ub],bayestopt_.name,bayestopt_,hh,dataset_,dataset_info,options_,M_,estim_params_,bayestopt_,bounds,oo_); + [xparam1, fval, exitflag, hh, options_, Scale] = dynare_minimize_objective(objective_function,xparam1,options_.mode_compute,options_,[bounds.lb bounds.ub],bayestopt_.name,bayestopt_,hh,dataset_,dataset_info,options_,M_,estim_params_,bayestopt_,bounds,oo_); fprintf('\nFinal value of minus the log posterior (or likelihood):%f \n', fval); if options_.mode_compute==5 && options_.analytic_derivation==-1 %reset options changed by newrat diff --git a/matlab/optimization/dynare_minimize_objective.m b/matlab/optimization/dynare_minimize_objective.m index 85c9f8fa2f19539344c06a2e80953388c97aa857..7323664c5d7cc835eccbab988152d380a57ba9f6 100644 --- a/matlab/optimization/dynare_minimize_objective.m +++ b/matlab/optimization/dynare_minimize_objective.m @@ -1,11 +1,11 @@ -function [opt_par_values,fval,exitflag,hessian_mat,options_,Scale]=dynare_minimize_objective(start_par_value,minimizer_algorithm,objective_function,options_,bounds,parameter_names,prior_information,Initial_Hessian,varargin) -% function [opt_par_values,fval,exitflag,hessian_mat,Scale]=dynare_minimize_objective(start_par_value,minimizer_algorithm,objective_function,options_,bounds,parameter_names,prior_information,Initial_Hessian,varargin) +function [opt_par_values,fval,exitflag,hessian_mat,options_,Scale]=dynare_minimize_objective(objective_function,start_par_value,minimizer_algorithm,options_,bounds,parameter_names,prior_information,Initial_Hessian,varargin) + % Calls a minimizer % % INPUTS +% objective_function [function handle] handle to the objective function % start_par_value [n_params by 1] vector of doubles starting values for the parameters % minimizer_algorithm [scalar double] code of the optimizer algorithm -% objective_function [function handle] handle to the objective function % options_ [matlab structure] Dynare options structure % bounds [n_params by 2] vector of doubles 2 row vectors containing lower and upper bound for parameters % parameter_names [n_params by 1] cell array strings containing the parameters names @@ -25,7 +25,7 @@ function [opt_par_values,fval,exitflag,hessian_mat,options_,Scale]=dynare_minimi % none. % % -% Copyright (C) 2014 Dynare Team +% Copyright (C) 2014-2015 Dynare Team % % This file is part of Dynare. %