[R] nls
Prof Brian Ripley
ripley at stats.ox.ac.uk
Tue Aug 15 15:14:40 CEST 2006
You problem is x^c for x = 0. If you intended only c > 1, try a starting
value meeting that condition (but it seems that the optimal c is about
0.27 is you increase x slightly).
Why have you used ~~ ? (Maybe because despite being asked not to, you
sent HTML mail?)
On Tue, 15 Aug 2006, Xiaodong Jin wrote:
> Is there anyway to change any y[i] value (i=2,...6) to make following NLS workable?
>
> x <- c(0,5,10,15,20,25,30)
> y <- c(1.00000,0.82000,0.68000,0.64000,0.66667,0.68667,0.64000)
> lm(1/y ~~ x)
> nls(1/y ~~ a+b*x^c, start=list(a=1.16122,b=0.01565,c=1), trace=TRUE)
>
> #0.0920573 : 1.16122 0.01565 1.00000
> #Error in numericDeriv(form[[3]], names(ind), env) :
> # Missing value or an infinity produced when evaluating the model
>
>
> ---------------------------------
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list