[R] Bad points in regression

Alberto Monteiro albmont at centroin.com.br
Fri Mar 16 12:56:56 CET 2007


I have a question, maybe it's better to explain by example:

alpha <- 0.3
beta <- 0.4
sigma <- 0.5
err <- rnorm(100)
err[15] <- 5; err[25] <- -4; err[50] <- 10
x <- 1:100
y <- alpha + beta * x + sigma * err
ll <- lm(y ~ x)
plot(ll)

Now, the graphs clearly show that 15, 25 and 50 are the indexes
of the bad points. How can I retrieve this information from ll?

Alberto Monteiro



More information about the R-help mailing list