[R] optim with gradient
w.huber at dkfz-heidelberg.de
Wed Mar 20 17:47:01 CET 2002
Q1: first, it seems that the validity of this guarantee depends on the "method" used. Using method="L-BFGS-B", I found that that guarantee seemed to hold for the iterations towards the optimum, but was violated for the final evaluation of the hessian. After submitting a bug report it appears that the documentation will be updated in version 1.5.
Q2: You can use e.g. a variable local to prov() which is visible both to fun() and d.fun(), manipulating it with "<<-" in fun(). Given the uncertainty about this guarantee, it seems advisable to also store the fun() parameters in there, and explicitely verify in d.fun() whether the parameters are really the same...
Dr. Wolfgang Huber
Dep. Molecular Genome Analysis
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help