Dear Marco,
I'm trying to remove global variable objective_function_penalty_base
that is used by mode_compute 4 and 5.
Doing that, I remarked things that I don't understand concerning
mode_compute 5 in master:
1) in ./matlab/optimization/dynare_minimize_objective.m, newrat() is
called on line 247 with the 6th input argument set to zero. My guess is
that it should be newflagrat, otherwise I don't understand what
newflgrat is used for. In any case, the current behavior and results
seem different from what we had in the stable version
2) looking at the code in
./matlab/optimization/newrat.m, I understand that the
final value of the hessian is computed at the end of this function according to user's options. I
don't understand the reason for the code in
./matlab/dynare_estimation_1. lines 262-288
3) Is it necessary for newrat() to reset options_.analytic_derivation
and have ./matlab/dynare_estimation_1.m lines 241-242?
My impression is that we have changed the code without fully
understanding how newrat.m is working.
Best
--
Michel Juillard