I'm a very recent user of R. I have been adapting my Splus programmes and I found only one (important) problem. There exists no function "nlmin" in R and its substitute, "nlm", does not work well with my kind of problems, sometimes no achieving convergence, other tines "converging" to impossible values. My models are highly nonlinear and are to be estimated by both GMM and empirical likelihood methods. Is there any alternative nonlinear optimization command in R? In the help file it is said that "nlm" is only a preliminary version, is it expected to replace/improve it soon? Does anyone have any alternative algorithm? Thanks for your help, Joaquim Ramalho Department of Economics University of Bristol -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> > > I'm a very recent user of R. I have been adapting my Splus programmes > and I found only one (important) problem. There exists no function > "nlmin" in R and its substitute, "nlm", does not work well with my kind > of problems, sometimes no achieving convergence, other tines > "converging" to impossible values. My models are highly nonlinear and > are to be estimated by both GMM and empirical likelihood methods.I have also been using nlm for the past 4-5 years in R and for another 5-10 years before that as a Fortran program. Most of my problems are also highly nonlinear and I rarely have had a problem unless the model is unsuitable for the data. nlm has several arguments that can be modified to aid in convergence. If you obtain impossible values, then you appear to have a constrained optimization problem. Often parameter transformation can fix this (e.g. log for positive values, logit if between 0 and 1). Constrained optimization is a difficult problem for which really good algorithms are not available. All of the numerical analysts that I have spoken to agree that the algorithm in nlm for unconstrained optimization without supplying analytic derivatives is about the best available. Note that, as of 0.90, you can supply the derivatives to nlm, which may also solve your problem (although my experience is that it makes little difference if the model is suitable for the data). Jim> > Is there any alternative nonlinear optimization command in R? In the > help file it is said that "nlm" is only a preliminary version, is it > expected to replace/improve it soon? Does anyone have any alternative > algorithm? > > Thanks for your help, > > Joaquim Ramalho > Department of Economics > University of Bristol > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Wed, 1 Dec 1999, JJ Dos Santos Ramalho wrote:> > I'm a very recent user of R. I have been adapting my Splus programmes > and I found only one (important) problem. There exists no function > "nlmin" in R and its substitute, "nlm", does not work well with my kind > of problems, sometimes no achieving convergence, other tines > "converging" to impossible values. My models are highly nonlinear and > are to be estimated by both GMM and empirical likelihood methods. > > Is there any alternative nonlinear optimization command in R? In the > help file it is said that "nlm" is only a preliminary version, is it > expected to replace/improve it soon? Does anyone have any alternative > algorithm?Yes, yes. Note, though that nlm was improved for 0.90.0 and can now make use of gradient information. Does your application have known derivatives? (I know nlmin does not use them.) The aim is to allow alternative methods within the nlm function fairly soon (a couple of months). One issue to allow the methods to be used recursively, which means basing them on C code not Fortran code. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._