Re: [R] Method of L-BFGS-B of optim evaluate function outside ofbox constraints

2003-08-21 Thread Shengqiao Li
Thanks. log.arg worked to make sure nonnegative value. But the other side is overflow. Beyond the upper limit, the exp(arg) is large and bessel overflows even if exponentially scaled one is used. This will happen at 1/500 chance. Due to I'm doing 10,000 simulations, this problem blocked me.

Re: [R] Method of L-BFGS-B of optim evaluate function outside ofbox constraints

2003-08-21 Thread Shengqiao Li
Hope this bug will be fixed in the future. Li On Wednesday 20 August 2003 15:44, Shengqiao Li wrote: Hi, R guys: I'm using L-BFGS-B method of optim for minimization problem. My function called besselI function which need non-negative parameter and the besselI will overflow if the

Re: [R] Method of L-BFGS-B of optim evaluate function outside ofbox constraints

2003-08-20 Thread Spencer Graves
I see two problems, which I handle differently: First, if arg must be nonnegative, I program fn in terms of log.arg, so it can never become nonpositive. Second, is besselI always positive? If yes, then program fn to compute log(besselI) and use that. Standard references such as