[R] Extrapolated regression lines

Johan A. Stenberg johan.stenberg at emg.umu.se
Thu Oct 12 15:41:00 CEST 2006


Dear list members,

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?

Thank you in advance,
Johan

model<-lm(Herb~Para)
plot(Para,Herb)
abline(model)



More information about the R-help mailing list