ボンフェローニ検定による外れ値算出

Reference – https://twitter.com/R_Programming/status/644570111941054464
> library(car)
> head(cars)
  speed dist
1     4    2
2     4   10
3     7    4
4     7   22
5     8   16
6     9   10
> mod<-lm(dist~speed,data=cars)
> outlierTest(mod)

No Studentized residuals with Bonferonni p < 0.05
Largest |rstudent|:
   rstudent unadjusted p-value Bonferonni p
49 3.184993          0.0025707      0.12853
> plot(cars$speed,cars$dist)
> abline(mod,col="red")
> text(cars$speed,cars$dist,row.names(cars),cex=1,pos=4,col="blue")
> cars[row.names(cars)==49,]
   speed dist
49    24  120