Changed order of the input arguments in dynare_mimimize_objective.
It is more standard to have the name of the routine (defining the objective to be minimized) as a first argument.time-shift
parent
beb7826376
commit
0ffb9dd6e2
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
%
|
||||
|
|
Loading…
Reference in New Issue