[R] optim with gradient

Göran Broström gb at stat.umu.se
Wed Mar 20 17:56:06 CET 2002


On Wed, 20 Mar 2002, Wolfgang Huber wrote:

> 
> Hi Göran,
> 
> 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...     

Yes, that should work! I had totally erased "<<-" from my 
R-knowledge-database after all the condemnations of its use I have read
on this very list. Maybe this is an exception...?

Thanks,

Göran

> 
> Best regards,
> Wolfgang.
> 
> 
> 
> Dr. Wolfgang Huber
> DKFZ 
> Dep. Molecular Genome Analysis 
> 69120 Heidelberg 
> Germany
> 

-- 
 Göran Broström                      tel: +46 90 786 5223
 professor                           fax: +46 90 786 6614
 Department of Statistics            http://www.stat.umu.se/egna/gb/
 Umeå University
 SE-90187 Umeå, Sweden             e-mail: gb at stat.umu.se

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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 mailing list