Displaying 1 result from an estimated 1 matches for "scale_x_log".
Did you mean:
scale_x_log10
2011 Sep 07
1
linear regression, log-transformation and plotting
.... As usual I'd like to plot the original data (not log transformed) but in a log-scale.
I tried two approaches the standard plot function and ggplot.
# Plot with ggplot
ggplot()+
geom_point(aes(b1,a1,data=data1))+
geom_abline(aes(intercept=coef(model)[1],slope=coef(model)[2]))+
scale_y_log()+
scale_x_log()
# Plot with standard plot
plot(b1,a1,log="xy")
abline(model,untf=T)
abline(model,untf=F)
1) The regression lines are different for plot vs. ggplot(transformed or untransformed). So what is actually the correct line?
2) The regression line was calculated on basis of log(x+1), but the...