[R] nls convergence problem

Earl F. Glynn efg at stowers-institute.org
Tue Aug 15 22:45:38 CEST 2006


"Dieter Menne" <dieter.menne at menne-biomed.de> wrote in message 
news:loom.20060815T205133-5 at 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



More information about the R-help mailing list