[R] problem with log axis
Ben Bolker
bolker at ufl.edu
Thu Nov 1 20:00:33 CET 2007
Ben Bolker wrote:
>
> plot(x,y,log="x")
> abline(r1)
> abline(r1,untf=TRUE,col=2)
> abline(r1,untf=FALSE,col=3) ## ??
> lines(x,predict(r1),col=4)
>
>
On second thought, I don't think this is a bug.
What "untf" is supposed to do is to transform what would
be a line in the original (untransformed) coordinate system
to the appropriate curve in the new coordinate system.
Thus, what it tries to do is to transform the naive line
y=a+b*x so that it shows up correctly in the transformed
coord. system (which is even worse). (I do agree that this
is darned confusing when abline is applied to a linear model.)
Perhaps the bottom line is the abline(M) where M is a linear
model is a bit of a hack, and predict is better ...
Ben
--
View this message in context: http://www.nabble.com/problem-with-log-axis-tf4733049.html#a13535214
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list