[R] power law fit with unknown zero

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Thu Oct 18 16:46:42 CEST 2007


Thomas Hoffmann wrote:
> Dear R-helpers
> 
> I would like to do a fit of the form: y = a (x+c)**b, where a, b and c 
> are unknown.
> 
> Does anybody know how to do it?

If they did but didn't answer, would it matter?

 > PLEASE do read the posting guide
 > http://www.R-project.org/posting-guide.html
 > and provide commented, minimal, self-contained, reproducible code.

... including some data...

Perhaps take the log of both sides and use nls with intercept log(a)?
Or include an additive intercept and apply nls to the equation without 
taking the log? Depends on your model of errors...

-- 
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                       Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k



More information about the R-help mailing list