# NOT RUN {
# select only mpg and disp (continuous)
mt1 <- mtcars[, c(1, 3, 4)]
# create some fake outliers and attach outliers to main df
mt2 <- rbind(mt1, data.frame(mpg = c(37, 40), disp = c(300, 400), hp = c(110, 120)))
# fit model with outliers
model <- lm(disp ~ mpg + hp, data = mt2)
check_outliers(model)
plot(check_outliers(model))
check_outliers(model, method = "m")
# }
# NOT RUN {
# This one takes some seconds to finish...
check_outliers(model, method = "ics")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab