[R] issue with L-BFGS-B in optim (optim just hangs)

Paul Smith phhs80 at gmail.com
Wed Apr 15 17:10:33 CEST 2009


On Wed, Apr 15, 2009 at 3:57 PM, Tiago Marques <tiago at mcs.st-and.ac.uk> wrote:
> I am using optim, with method=L-BFGS-B, to maximize a likelihood inside a
> large simulation exercise. This runs fine for most simulated data sets, but
> for some reason, about 1 out of 100 times, optim will just hang.
> Using a dumb approach to the problem (i.e. printing the parameter values
> each time the function being maximized is evaluated), I tracked down when
> this happens, and although I do not understand optim's behavior or what
> triggers it, it seems to happen specifically when one of the parameter
> boundaries is reached - and then the function just stops being evaluated.
>
> But there is nothing special with the parameter boundary, i.e., if  I
> decrease or increase the boundary using say lower and upper arguments in
> optim, the function seems to hang at the new values. So it does not seem to
> be a specific value that triggers the behavior, but the fact that the value
> is the boundary defined in the function call.
>
> As anyone seen this behavior before? Is it me missing something or is this
> some bug in "method=L-BFGS-B"? Any suggestions on how to deal with it?

Can you provide us with a minimal example exhibiting the problem you
are mentioning?

Paul




More information about the R-help mailing list