[R] nls convergence problem

Dieter Menne dieter.menne at menne-biomed.de
Tue Aug 15 20:52:36 CEST 2006


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



More information about the R-help mailing list