Hi Marco, On the basic standard output for optimizers in matlab, I think it is [X,FVAL,EXITFLAG,OUTPUT] = FUNC(...) at least for fminsearch. Other output arguments like GRAD and HESS come after OUTPUT when the optimizers allow for them.
Maybe we should also use this to standardize the ouput arguments a user-defined optimizer should provide. In my opinion, the first two X and FVAL are the most important.
I welcome the changes.
Best, Junior
On Tue, Apr 24, 2012 at 3:39 PM, Michel Juillard michel.juillard@mjui.frwrote:
Hi Marco,
thanks a lot for this new development. I agree with your changes.
All the best,
Michel
On 04/24/2012 06:12 PM, Marco Ratto wrote:
Dear Friends,
I just completed the first tests with estimation of DYNARE with analytic scores and hessian and everything seems to work. I have implemented it so far for stationary models both for univariate and multivariate KF.
Before committing the changes, I would like to anticipate you some decisions I took: I particular I had to change the list of output of dsge_likelihood (and similarly for consistency of dsgevar_likelihood).
We had discussed this a bit some time ago and I envisaged the possibility to keep the current list simply changing the type of output
LIK = scalar for numerical derivs
LIK= cell = {LIK, GRAD, HESS}
Stephan in particular supported this last option.
However, the standard form of objective functions in matlab is
[fval, grad, hess] = func( ... )
and this form would allow, for example, a direct use of mode_compute=1 or 3. This means I have adapted all fval calls, e.g. in csminwel1, so that now the exit_flag is 4th output of dsge_likelihood. This will also allow to use Sims optimizer with analytic derivatives
The same for mode_compute=5.
By the way, this will also allow to eliminate the annoying dsge_likelihood_hh. I have also thought of a way to adapt mode_compute=5 for dsge-var as well.
what do you think? best Marco
______________________________**_________________ Dev mailing list Dev@dynare.org https://www.dynare.org/cgi-**bin/mailman/listinfo/devhttps://www.dynare.org/cgi-bin/mailman/listinfo/dev