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.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to