Thomas,

I think the issue of having reasonable starting values is inherent in all 
nonlinear optimization problems (unless they have some additional 
properties like convexity, for example).  Using a different algorithm may 
or may not help.  In fact, a vast majority of existing algorithms 
guarantees only local convergence provided that the starting point is 
within a certain distance from the solution.

If you are interested in this particular model, the following procedure 
seems to give reasonable starting point.

1.  Take a guess at c.  This is relatively easy since c is the value of y 
when a=0.  For your data a crude guess could be c=8.
2.  For a fixed value of c your model can be linearized by the following 
transformations
        y1 <- log(y-8)
        x1 <- log(x)
3.  Do
        summary(lm(y1~x1))
     and obtain values for intecept and slope
4.  Your starting values for nls are (a=exp(Intercept), b=slope, c=8) 

Hope this helps,

Andy

__________________________________
Andy Jaworski
518-1-01
Process Laboratory
3M Corporate Research Laboratory
-----
E-mail: apjaworski@mmm.com
Tel:  (651) 733-6092
Fax:  (651) 736-3122



From:
Thomas Bschorr <bschorr@phys.ethz.ch>
To:
r-help@r-project.org
Date:
04/30/2010 03:33 PM
Subject:
[R] Curve Fitting
Sent by:
<r-help-bounces@r-project.org>



I am having troubles in fitting functions of the form

y~a*x^b+c
 to data, for example

x<-c(0.1,0.36,0.63,0.90,1.166,1.43, 1.70, 1.96, 2.23)
y<-c(8.09,9.0,9.62,10.11,10.53,10.9, 11.25, 11.56, 11.86)

I tried for example with nls, which did only work with really good initial 
guessed values.
Any suggestion, what I should use?
Thanks a lot
Thomas


                 [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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.




	[[alternative HTML version deleted]]

