Re: [R] nls convergence problem

From: Earl F. Glynn <efg_at_stowers-institute.org>
Date: Wed 16 Aug 2006 - 06:45:38 EST

"Dieter Menne" <dieter.menne@menne-biomed.de> wrote in message news:loom.20060815T205133-5@post.gmane.org...
> Earl F. Glynn <efg <at> stowers-institute.org> writes:
> This toy problem is exactly what the warning is for:
>
> Warning
> Do not use nls on artificial "zero-residual" data.
>
> Add some noise and try again.

Thank you!

I had adapted some code and must confess I had read ?nls.control thoroughly, but not ?nls. I had even used debug on nls, traced it through line by line to the .Call statement, trying to figure out why nls.out never got defined. The source code has no comments at all.

IMHO, the warning should be in the "Description" at the top of the ?nls page, not at the bottom of the page. The warning should also appear on the ?nls.control page. But, a better way would be to have a software design that eliminated the warning.

It's not clear to me why this problem cannot be "fixed" somehow. You shouldn't need to add noise to a problem to solve it. (It's a bit like saying addition works, but not for integers without adding some noise.) If there can be arbitrary defaults of maxiter=50, and (relative) tol=1e-5 in nls.control, there could be another arbitrary (absolute) convergence criterion. Or, maybe there's something I don't understand about the algorithm being used.

Just my $0.02 and minority opinion,
efg



R-help@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. Received on Wed Aug 16 07:02:56 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 16 Aug 2006 - 18:22:31 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.