Skip to content
Prev 17014 / 398502 Next

fit nonlinear model with groups

Bill Simpson <W.Simpson at gcal.ac.uk> writes:
In a situation like this the first thing to do is to add the optional
argument trace = TRUE to the call to nls.  This provides some
information on the progress of the iterations.

Doing that will probably show that the iterations are at the right
place but the convergence criterion is not below the threshhold.  The
reason is that the convergence criterion is a relative criterion that
compares the expected change in the sum-of-squares at the next step to
the current residual sum-of-squares.

*When the data are simulated without any random noise* this takes the
form of (round-off error 1)/(round-off error 2).

Just add some random noise to y and you should be ok.

And no I don't regard this as a bug in nls, I regard it as a bug in
the simulation.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._