Kamel, You have already had several comments suggesting some ideas for improvement, namely,
1) correct name for iteration limit (Karl Ove Hufthammer) 2) concern about number of parameters and also possibilities of multiple minima (Doug Bates) 3) use of optimx to allow several optimizers to be tried (Ravi Varadhan). Here is another. Within optimx() we call can call Rcgmin, which possibly might help with box-constrained minimization of a function of a lot of parameters like yours. There is a "but", and it is that analytic gradients are almost mandatory. Moreover, our experience base is mainly on unconstrained functions of many parameters. However, if you can debug the function/gradient so that the number of parameters is correct and there is a known correct value for f(x) for a given x, I'll be willing to give the problem a try. Send it to me off-list, preferably as a zip file of R code and data (or alternatively a tarball). We need to gain more experience with such functions and methods, as well as learn how to formulate the problems for a good chance of success. Best, JN ______________________________________________ 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.