
> 
> Hi Jim,
> 
> Thanks very much for your help.
> 
> I did what you said:
> > x
> [1] 1 2 3 4 5 6
> > y
> [1] 0.5000000 0.3979262 0.3551846 0.3305826 0.3142192 0.3023836
> > fn <- function(p) (y-p[1]*x^p[2]+p[3])^2

sorry that should have been:
fn <- function(p) sum((y-p[1]*x^p[2]+p[3])^2)
It's sum of squares of course! Jim
> >  nlm(fn,p=c(0.3,-0.6,0.2))
> Error: invalid function value in optimizer
> 
> As you can see it didn't work.  What went wrong?
> 
> Thanks very much for any help.
> 
> Best wishes,
> Bill
> 
> 

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

