Re: [R] nls convergence problem

From: Dieter Menne <dieter.menne_at_menne-biomed.de>
Date: Wed 16 Aug 2006 - 04:52:36 EST

Earl F. Glynn <efg <at> stowers-institute.org> writes:

>
> Here's my toy problem:
> > ?nls.control
> > ?nls
> > # Method 2
> > X <- 0:15
> > Y <- 9.452 * exp(-0.109*X) + 5.111 # Toy problem
> >
> > nls.out <- nls(Y ~ a*exp(b*X)+c,
> + start=list(a=6,b=-0.5,c=1),
> + control=nls.control(maxiter=15, tol=0.01), # nothing makes
> sense here
> + trace=TRUE)

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.

Dieter Menne



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 05:05:08 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 - 08:20:59 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.