[R] optimization and gradient

Gabor Grothendieck ggrothendieck at gmail.com
Tue Apr 22 12:11:48 CEST 2008

Check out:


On Tue, Apr 22, 2008 at 5:50 AM, Ardia David <david.ardia at unifr.ch> wrote:
> Dear all,
> I am using the functions 'optim' and 'nlminb'. For both, you can provide
> a function which computes the gradient of the objective function (to
> enhance speed and precision). In my case, both the objective function
> and the gradient take time to be computed and share many common
> computations (similar matrix, products, etc...). Therefore, I have to
> compute these quantities twice which slows down the procedure. How can I
> get rid of that in a similar way as with 'nlmin' which allows the
> attribute 'gradient' in the output of the objective function?
> Thanks a lot for your answer
> --
> David Ardia
> H-building, room 11-26
> Econometric Institute
> Erasmus University
> PO Box 1738
> NL 3000 DR Rotterdam
> The Netherlands
> Phone: +31 (0)10 408 2269
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list