Try log10()...
-pd
> On 07 Aug 2016, at 21:03 , Spencer Graves wrote:
>
> Hello:
>
>
> In the following plot, the fitted line plots 100 percent above the
> points:
>
>
> tstDat <- data.frame(x=10^(1:3), y=10^(1:3+.1*rnorm(3)))
> tstFit <-
Hello:
In the following plot, the fitted line plots 100 percent above
the points:
tstDat <- data.frame(x=10^(1:3), y=10^(1:3+.1*rnorm(3)))
tstFit <- lm(log(y)~log(x), tstDat)
plot(y~x, tstDat, log='xy')
abline(tstFit)
I can get the correct line with the following: