Re: [R] abline in log-log power law plot

2008-02-22 Thread Peter Dalgaard
hadley wickham wrote: > On Fri, Feb 22, 2008 at 2:38 PM, martin klein <[EMAIL PROTECTED]> wrote: > >> I have a power law plot in log-log scale using plot(x,y,log="xy") but I >> can't get the regression line to plot correctly. >> abline(lm(log(y)~log(x))) plots a straight line that looks promi

Re: [R] abline in log-log power law plot

2008-02-22 Thread hadley wickham
On Fri, Feb 22, 2008 at 2:38 PM, martin klein <[EMAIL PROTECTED]> wrote: > > I have a power law plot in log-log scale using plot(x,y,log="xy") but I > can't get the regression line to plot correctly. > abline(lm(log(y)~log(x))) plots a straight line that looks promising but > the intercept with

[R] abline in log-log power law plot

2008-02-22 Thread martin klein
I have a power law plot in log-log scale using plot(x,y,log="xy") but I can't get the regression line to plot correctly. abline(lm(log(y)~log(x))) plots a straight line that looks promising but the intercept with the y-axis seems to be way off. summary(lm(log(y)~log(x))) gives the values but i can