Learn R Programming

olsrr (version 0.4.0)

ols_srsd_plot: Studentized Residual Plot

Description

Graph for identifying outliers

Usage

ols_srsd_plot(model)

Arguments

model

an object of class lm

Value

ols_srsd_plot returns a list containing the following components:

outliers

a tibble with observation number and studentized residuals that exceed threshold

for classifying an observation as an outlier
threshold

threshold for classifying an observation as an outlier

Details

Studentized deleted residuals (or externally studentized residuals) is the deleted residual divided by its estimated standard deviation. Studentized residuals are going to be more effective for detecting outlying Y observations than standardized residuals. If an observation has an externally studentized residual that is larger than 3 (in absolute value) we can call it an outlier.

Examples

Run this code
# NOT RUN {
model <- lm(mpg ~ disp + hp + wt, data = mtcars)
ols_srsd_plot(model)
# }

Run the code above in your browser using DataLab