Stéphane Luchini
2003-Mar-27 11:24 UTC
[R] How to obtain final gradient estimation from optim
I use optim to compute maximum likelihood estimations without giving an analytical gradient to optim. However, I would like to get an output of the final numerical gradient vector and the final matrix of contributions to the gradient. But I did not find any mention of this kind of output in help pages. Does anyone know how to do that ? Stephane Luchini GREQAM Marseille, France
ripley@stats.ox.ac.uk
2003-Mar-27 11:52 UTC
[R] How to obtain final gradient estimation from optim
On Thu, 27 Mar 2003, [iso-8859-15] St?phane Luchini wrote:> I use optim to compute maximum likelihood estimations without giving an > analytical gradient to optim. However, I would like to > get an output of the final numerical gradient vector and the final matrix of > contributions to the gradient. But I did not > find any mention of this kind of output in help pages. Does anyone know how to > do that ?No, and optim does not even necessarily calculate a gradient. But if it does, it is supposed to be zero at a maximum.... I don't lnow what you mean by `contributions to the gradient': optim works with the (I presume) log-likelihood. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595