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

Philipp Pagel p.pagel at wzw.tum.de
Tue Jun 17 18:47:22 CEST 2008



> 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

cu
	Philipp

-- 
Dr. Philipp Pagel
Lehrstuhl für Genomorientierte Bioinformatik
Technische Universität München
Wissenschaftszentrum Weihenstephan
85350 Freising, Germany
http://mips.gsf.de/staff/pagel



More information about the R-help mailing list