> I have some data I want to plot together with a best-fit line. (see MWE
> below)
...
> Can someone help me with that? What am I doing wrong?

Not logging the lm. Also, you've calculated lm() the wrong way round; you've 
regressed x on y.

Try

plot(log(d), xlab="log(x)", ylab="log(y)")
abline(lm(y ~ x, data = log(d)))

S Ellison




*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to