[R] Finding starting values for the parameters using nls() or nls2()
profjcnash at gmail.com
Mon Oct 10 04:37:40 CEST 2016
Despite nlmrt "solving" the OP's problem, I think Gabor's suggestion likely gives a more sensible approach
to the underlying modelling problem.
It is, of course, sometimes important to fit a particular model, in which case nls2 and nlmrt are set up to grind away.
And hopefully the follow-up to nlmrt I'm working on will have enough capability in getting analytic derivatives
to work for a wider class of models. Note that functional approaches in nlmrt and minpack.lm allow users to
provide derivatives. Too many users think numerical approximations are a panacea, but my experience is that
most problems benefit from very accurate derivatives, of which analytic expressions are generally the best.
On 16-10-09 09:24 PM, Gabor Grothendieck wrote:
> 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)
> plot(Retention ~ Area, cl.o)
> lines(fitted(fm) ~ Area, cl.o, col = "red")
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help