ols_plot_resid_lev: Studentized residuals vs leverage plot

View source: R/ols-rstud-vs-lev-plot.R

ols_plot_resid_levR Documentation

Studentized residuals vs leverage plot

Description

Graph for detecting outliers and/or observations with high leverage.

Usage

ols_plot_resid_lev(model, threshold = NULL, print_plot = TRUE)

Arguments

model

An object of class lm.

threshold

Threshold for detecting outliers. Default is 2.

print_plot

logical; if TRUE, prints the plot else returns a plot object.

See Also

ols_plot_resid_stud_fit(), ols_plot_resid_lev()

Examples

model <- lm(read ~ write + math + science, data = hsb)
ols_plot_resid_lev(model)
ols_plot_resid_lev(model, threshold = 3)


olsrr documentation built on May 29, 2024, 12:35 p.m.