[R] How do I plot: regression line, regression line + s.d, regression line - s.d on the same chart?

Jorgy Porgee jorgy.porgee at gmail.com
Tue Aug 11 11:07:40 CEST 2009


Hello all,
I've got a scatter plot, for which I create a regression line using:
reg<- lm(yvars~xvars) and can plot the regression through the scatter
just fine.
I'd like to add two additional lines on the scatter plot: one being
regressionline+standard deviation, the other being
regressionline-standard deviation, thus creating some kind of 'band'
for the scatter.

Any help will be much appreciated. Thanking you in advance,

George.




More information about the R-help mailing list