Re: [R] optim: abnormal termination in lnsrch (resend)

2010-01-12 Thread Ravi Varadhan
You forgot a lot of details. Can you send us more information about the fn and also some minimal code that can reproduce the problem? Ravi. --- Ravi Varadhan, Ph.D. Assistant Professor, The Center on Aging and

Re: [R] optim: abnormal termination in lnsrch (resend)

2010-01-12 Thread Ravi Varadhan
Mario, It seems likely that your function is not smooth in the parameters. This may create problems for some optimizers that require smoothness. However, I was able to get good convergence with `spg' function in my BB package. Here is how it works: require(BB) Loading required package: BB

Re: [R] optim: abnormal termination in lnsrch (resend)

2010-01-12 Thread Berend Hasselman
Mario Valle wrote: [sorry, forgot some details...] I'm using optim(param, fun, method='L-BFGS-B', lower=lo, upper=up) to minimize a certain function. Often the minimization ends with the message: ERROR: ABNORMAL_TERMINATION_IN_LNSRCH What is optim() trying to say? What have I to