[R] Non linear optimization with nloptr package fail to produce true optimal result

J C Nash pro|jcn@@h @end|ng |rom gm@||@com
Fri Dec 13 22:01:34 CET 2024



On 2024-12-13 13:55, Daniel Lobo wrote:
> 1. Why nloptr() is failing where other programs can continue with the
> same set of data, numbers, and constraints?
> 2. Is this enough ground to say that nloptr is inferior and user
> should not use this in complex problems?

As I indicated in a recent response, nloptr has a lot of settings and possibilities.
It is VERY easy to choose poor values. I think Ravi Varadhan has probably done a lot
of work in alabama to set things up so the user has an easier time. I certainly did.
In fact I'm now getting complaints in your modified script when I try nloptr, but that's
likely some typo or other.

I substituted optim's Nelder-Mead for anms, and got same results essentially, so you
could run with just old-standard optim() which is built into R. (I even wrote the original
BASIC code in 1975.)

JN



More information about the R-help mailing list