> When I create a simple scatterplot with a regression line (se below) the
> line is automatically extrapolated outside the range of data points. Why
> is this and how can I prevent R from extrapolating the regression line?
ggplot does this by default:
install.packages("ggplot")
library(ggplot)
qplot(Para, Herd, type=c("smooth","point"), method=lm)
Regards,
Hadley
______________________________________________
[email protected] 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.