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

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to