threeOuts: Combine All Three Common Outlier Types

Description Usage Arguments See Also Examples

Description

Simple function to produce a plots and a final data frame from studentized deleted residuals, hat values (leverage), and Cook's distance, after a model run in lm(). Resulting dataframe will be sorted by the inThree variable (observation is considered an outlier on all three plots) and then the Cooks_D variable.

Usage

1
threeOuts(obj, key.variable = NULL, print.plot = FALSE)

Arguments

obj

Model object from an lm() fiitted equation.

key.variable

Required if lm() data object is of tibble class. Name of the unique key variable (identifier variable). If data object is of data.frame class, this is optional and row.names will be used instead.

print.plots

Logical: Should plots for all three outlier tests be shown?

See Also

studResidPlot levPlot cooksPlot

Examples

1
2
3
mod <- lm(hp ~ disp, data=mtcars)
summary(mod)
threeOuts(mod)

MichaelJMahometa/SDSRegressionR documentation built on March 3, 2021, 10:51 p.m.