Re: [R] nls

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Tue 15 Aug 2006 - 23:14:40 EST

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@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@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

______________________________________________
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 Tue Aug 15 23:24:16 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 - 00:22:05 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.