Skip to content
Prev 177418 / 398506 Next

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

Tiago,

If you have an improper integral, i.e. with at least one of the limits being
infinite, it is generally not a good idea to use large positive or negative
values to compute such integrals. You should use "integrate" (calling it
twice) to compute your double integral.  This might solve your problem,
assuming that is your problem.

Ravi.
----------------------------------------------------------------------------
-------

Ravi Varadhan, Ph.D.

Assistant Professor, The Center on Aging and Health

Division of Geriatric Medicine and Gerontology 

Johns Hopkins University

Ph: (410) 502-2619

Fax: (410) 614-9625

Email: rvaradhan at jhmi.edu

Webpage:  http://www.jhsph.edu/agingandhealth/People/Faculty/Varadhan.html



----------------------------------------------------------------------------
--------


-----Original Message-----
From: Tiago Marques [mailto:tiago at mcs.st-and.ac.uk] 
Sent: Friday, April 17, 2009 11:56 AM
To: Ravi Varadhan
Cc: r-help at r-project.org
Subject: Re: [R] issue with L-BFGS-B in optim (optim just hangs)

Dear R-help list,

Just a wrap up for this issue. Thanks to Ravi Varadan and Paul Smith for
useful feedback (both on and off list).

It seems like the culprit was another function being called within optim,
namely adapt (used to solve numerically a double integral in the likelihood
I am maximizing). From what I was able to track down, it is adapt that just
hangs. I do not know exactly why, but decreasing the precision in adapt,
using parameter eps, solves it somewhat.

I have not yet investigated thoroughly if decreasing eps does have an impact
on my results, but that is another story!

Best,

Tiago
Ravi Varadhan wrote:
al.
hang.
being evaluated.
it?