[R] Matlab's lsqnonlin

Martin Maechler maechler at stat.math.ethz.ch
Sat Sep 8 11:59:18 CEST 2007


>>>>> "KateM" == Katharine Mullen <kate at few.vu.nl>
>>>>>     on Fri, 7 Sep 2007 20:07:41 +0200 (CEST) writes:

    KateM> The thread you linked to regarding Levenberg-Marquardt's supposed lack of
    KateM> availability is from 2001; it has been possible to get
    KateM> to the MINPACK implementation of Levenberg-Marquardt within R via the
    KateM> package minpack.lm
    KateM> (http://cran.r-project.org/src/contrib/Descriptions/minpack.lm.html) since
    KateM> 2005.

Thanks a lot, Kate.

I'm wondering about experiences:
Do you know of cases where  minpack.lm's  nls.lm() solved a
(real) problem that nls() would have a problem with ?

Beware however -- one of the main things I learned about this
field from Doug Bates, co-author of Bates_and_Watts and
prinicipal author of S's and R's nls() :
It's a *feature* that nls() does not converge sometimes when
other methods do falsely claim convergence!

Martin Maechler, ETH Zurich

    KateM> ----
    KateM> Katharine Mullen
    KateM> mail: Department of Physics and Astronomy, Faculty of Sciences
    KateM> Vrije Universiteit Amsterdam, de Boelelaan 1081
    KateM> 1081 HV Amsterdam, The Netherlands
    KateM> room: T.1.06
    KateM> tel: +31 205987870
    KateM> fax: +31 205987992
    KateM> e-mail: kate at nat.vu.nl
    KateM> homepage: http://www.nat.vu.nl/~kate/


    KateM> On Fri, 7 Sep 2007, Jose Luis Aznarte M. wrote:

    >> Hi! I'm translating some code from Matlab to R and I found a problem.
    >> I need to translate Matlab's function 'lsqnonlin'
    >> (http://www-ccs.ucsd.edu/matlab/toolbox/optim/lsqnonlin.html) into R,
    >> and at the beginning I  thought it would be the same as R's 'optim'. But
    >> then I looked at the definition of 'lsqnonlin' and I don't quite see how
    >> to make 'optim' to do the same thing. Does anyone have an idea?
    >> This is apart from the fact that I would like to use the Levenberg
    >> Marquardt algorithm which is not implemented in R (some discussion about
    >> this: http://tolstoy.newcastle.edu.au/R/help/00b/2492.html).
    >> Thank you! All the best,
    >> 
    >> 
    >> --                                                      --
    >> Jose Luis Aznarte M.       http://decsai.ugr.es/~jlaznarte
    >> Department of Computer Science and Artificial Intelligence
    >> Universidad de Granada           Tel. +34 - 958 - 24 04 67
    >> GRANADA (Spain)                  Fax: +34 - 958 - 24 00 79
    >> 
    >> ______________________________________________
    >> R-help at stat.math.ethz.ch 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.
    >> 

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



More information about the R-help mailing list