HI Junior,

indeed you are right about the standard output of optimizers and may be useful to conform  to these as well.
However, I was addressing the issue of the objective funcions to be fed to optimizers, so I think we can agree on that?

thanks a lot
Marco

On 4/25/2012 2:07 AM, Junior Maih wrote:
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.fr> wrote:
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/dev



--
"You can never know everything", Lan said quietly, "and part of what you know is always wrong. Perhaps even the most important part. A portion of wisdom lies in knowing that. A portion of courage lies in going on anyway." Robert Jordan, Winter's Heart, Book IX of the Wheel of Time.

We have not succeeded in answering all of our problems. The answers we have found only serve to raise a whole set of new issues. In some ways we are as confused as ever, but we believe we are confused on a higher level and about more important things. (cited in Øksendal, 1985)

-- 
Marco Ratto,
Joint Research Centre
The European Commission,
TP 361, 21027 ISPRA(VA), ITALY
Tel: +39 0332 78 5639
Fax: +39 0332 78 5733
marco.ratto@jrc.ec.europa.eu