[R] Finding starting values for the parameters using nls() or nls2()

Gabor Grothendieck ggrothendieck at gmail.com
Mon Oct 10 03:24:02 CEST 2016


If you are not tied to that model the SSasymp() model in R could be
considered and is easy to fit:

    # to plot points in order
    o <- order(cl$Area)
    cl.o <- cl[o, ]

    fm <- nls(Retention ~ SSasymp(Area, Asym, R0, lrc), cl.o)
    summary(fm)

    plot(Retention ~ Area, cl.o)
    lines(fitted(fm) ~ Area, cl.o, col = "red")



More information about the R-help mailing list