[Rd] optim: gr called at different parameter values than previous fn call if hessian=T (PR#1354)

w.huber@dkfz.de w.huber@dkfz.de
Sun, 3 Mar 2002 19:04:39 +0100 (MET)


Full_Name: Wolfgang Huber
Version: 1.4.0
OS: OSF1
Submission from: (NULL) (193.174.62.46)


The documentation to "optim" (packpage base) says "It is guaranteed that `gr' 
will be called immediately after a call to `fn' at the same parameter values."
I found this not to be true when I called 

   optim(fn=fn,gr=gr,method="L-BFGS-B",hessian=T,...)

When I changed this to hessian=F), every single call to gr was indeed preceded
by
a call to fn at the same parameter values. Apparently the final calculation of 
the hessian violates the above guarantee. 

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._