[R] newbie question: fitting power law
hoffmann at giub.uni-bonn.de
Tue Aug 5 16:14:05 CEST 2003
Dear R-helpers, dear Andrew
Andrew C. Ward schrieb:
>I wonder if you have any NAs in xy$x or xy$y.
The Dataframe looks like the following:
1 3.0 121.50951
2 2.0 30.61258
3 4.0 323.14837
4 8.2 3709.92471
For testing reasons I calculated y by:
> y <- 2.9 x^3.4
>Also, I think
>you could take logs of your equation and end up with a
if I use:
abline lm ( log(y)~log(x),xy)
the line does not seem to fit the plotted datapoints at all. While the
fitted exponent seems to be okay, the obtained intercept value is wrong.
Thanks for your answer.
More information about the R-help