[R] How to obtain final gradient estimation from optim

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Thu Mar 27 12:52:19 CET 2003


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



More information about the R-help mailing list