Check out: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/83547.html
On Tue, Apr 22, 2008 at 5:50 AM, Ardia David <[EMAIL PROTECTED]> 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@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. > ______________________________________________ R-help@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.