[R] Error in optim(p, fun,...)
Prof Brian D Ripley
ripley at stats.ox.ac.uk
Tue Sep 25 20:16:06 CEST 2001
On Tue, 25 Sep 2001, Ben Bolker wrote:
> My guess is that you should start with the setting of ndeps (see
> ?optim). If your function gives bad results for parameters outside of the
> bounds you have set, you probably need to set the bounds a tiny bit
> smaller and then set ndeps tinier still so that the finite-difference
> approximation to the derivatives doesn't try to evaluate the function
> outside the bounds ...
> (Q for Brian Ripley: does this seem reasonable? Or does L-BFGS-B
> actually check to make sure that finite differences are always evaluated
> inside the boundaries? Based on my experience with optim/L-BFGS-B I don't
> think so, but I'm not sure)
Yes, it does now check. It didn't long ago when you raised this.
As no bounds were active, it looks as if the function is blowing up inside
I would be thinking about the scaling rather than ndeps.
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
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