[R] issue with L-BFGS-B in optim (optim just hangs)
Tiago Marques
tiago at mcs.st-and.ac.uk
Wed Apr 15 16:57:09 CEST 2009
Dear R-Help List,
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?
Many thanks for any useful feedback,
Tiago
--
____________________________________________________________________________________________________
Tiago André Marques
Research Unit for Wildlife Population Assessment
Centre for Research into Ecological and Environmental Modelling
University of St Andrews
The Observatory
Buchanan Gardens
St Andrews
Fife KY16 9LZ
Scotland
Tel: 00441334461842 Fax: 00441334461800 (Scotland office)
Tel: 00351210198736 (Portugal home)
http://www-maths.mcs.st-andrews.ac.uk/homepages/tam2.html
http://www.creem.st-and.ac.uk/tiago/
The University of St Andrews is a charity registered in Scotland : No
SC013532
More information about the R-help
mailing list