Re: [R] how to fit a curve of form Y = X^Z

From: Philipp Pagel <>
Date: Tue, 17 Jun 2008 18:47:22 +0200

> I have two variables X and Y, and think that Y is related
> to X by a function of the form : Y = X^Z, where Z is < 1.
> However, I'm not sure how to find the best-fit equation to
> fit my data to a curve of this form using R. Have you any ideas?

You can use nlm() to fit a non-linear model. Another option would be to fit a linear model to log-log transformed data. However, if you are actually trying to fit to a power-law distribution you may want to have a look at these references:

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



Dr. Philipp Pagel
Lehrstuhl für Genomorientierte Bioinformatik
Technische Universität München
Wissenschaftszentrum Weihenstephan
85350 Freising, Germany

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 17 Jun 2008 - 18:26:43 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 17 Jun 2008 - 19:30:43 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive