[R] Poor performance of "Optim"
Ravi Varadhan
rvaradhan at jhmi.edu
Sun Oct 2 17:36:58 CEST 2011
Hi,
You really need to study the documentation of "optim" carefully before you make broad generalizations. There are several algorithms available in optim. The default is a simplex-type algorithm called Nelder-Mead. I think this is an unfortunate choice as the default algorithm. Nelder-Mead is a robust algorithm that can work well for almost any kind of objective function (smooth or nasty). However, the trade-off is that it is very slow in terms of convergence rate. For simple, smooth problems, such as yours, you should use "BFGS" (or "L-BFGS" if you have simple box-constraints). Also, take a look at the "optimx" package and the most recent paper in J Stat Software on optimx for a better understanding of the wide array of optimization options available in R.
Best,
Ravi.
More information about the R-help
mailing list