I am getting different trend lines when I use:
plot(x=time,y=eat)
abline(lm(eat~time))
versus
ggplot(data,aes(x=time,y=eat)) + geompoint()+ stat_smooth(method=lm,se=TRUE)
Why is there a difference in the two trend lines when plotted using different methods?
Is there a way to calculate the slope of the lines obtained via stat_smooth
?
When I plot the line using the slope/intercept obtained from summary(lm(eat~time))
, it does not match with the line obtained from stat_smooth