[R] use abline() for regression model in the plot

cruz cruadam at gmail.com
Wed Nov 5 02:15:44 CET 2008

On Wed, Nov 5, 2008 at 6:47 AM, Swanton0822 <iverson0822 at hotmail.com> wrote:
> after that i have been ask to do the following:
> 'The regression equation for EXPEND depending on ECAB is
> E(EXPEND)=119.0+1.73xECAB when there is outliners and
> E(EXPEND)=97.8+1.94xECAB when the outliners are omitted from the regression
> model. To the plot in 2) without the outliners, use abline() to add a fitted
> line for the full regression model, and a coloured, dashed regression line
> for the non-outliner regression model.'

m1 <- lm(EXPEND ~ ECAB, data=A5)

m2 <- lm(EXPEND ~ ECAB, data=A5e)

More information about the R-help mailing list