This document shows how to use R to identify outliers.
data(mtcars)
fit <- lm(mpg ~ ., data=mtcars)
summary(fit)
Here’s the outlier plot ranging from -2 to +2.
library(car)
## Loading required package: carData
fit <- lm(mpg ~ ., data=mtcars)
(outs <- influencePlot(fit))
## StudRes Hat CookD
## Merc 230 -1.217158 0.7422870 0.37922064
## Fiat 128 2.072513 0.1789510 0.07356371
## Ford Pantera L -2.164273 0.6632516 0.71352055