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? Thanks Thomas
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
> I would like to do a fit of the form: y = a (x+c)**b, where a, b and c > are unknown.The popular method of fitting a linear model to log-log transformed data was already mentioned. ALthough this works in many situations, it is considered to be somewhat biased an not very robust. I suggest to have a look at the following papers for some good suggestions: Goldstein, M.; Morris, S. & Yen, G. Problems with Fitting to the Power-Law Distribution European Physical Journal B, 2004, 41, 255-258 Newman, M. E. J. Power laws, Pareto distributions and Zipf's law Contemporary Physics, 2005, 46, 323 cu Philipp -- Dr. Philipp Pagel Tel. +49-8161-71 2131 Lehrstuhl f?r Genomorientierte Bioinformatik Fax. +49-8161-71 2186 Technische Universit?t M?nchen Wissenschaftszentrum Weihenstephan 85350 Freising, Germany and Institut f?r Bioinformatik / MIPS GSF - Forschungszentrum f?r Umwelt und Gesundheit Ingolst?dter Landstrasse 1 85764 Neuherberg, Germany http://mips.gsf.de/staff/pagel