[R] optim(method=L-BFGS-B) abnormal termination

2007-02-23 Thread Petr Klasterecky
Hi, my call of optim() with the L-BFGS-B method ended with the following error message: ERROR: ABNORMAL_TERMINATION_IN_LNSRCH Further tracing shows: Line search cannot locate an adequate point after 20 function and gradient evaluations final value 0.086627 stopped after 7 iterations Could

Re: [R] optim(method=L-BFGS-B) abnormal termination

2007-02-23 Thread Tony Plate
I usually see this message only when my gradient and objective functions do not match each other. I debug by comparing a finite difference approximation to the gradient with the result of the gradient function. I think you can also run optim() without supplying a gr() function - optim()