Data for identifying outliers in dfbetas plot.

ols_prep_dfbeta_outliers(d)

Arguments

d

A tibble or data.frame.

Examples

model <- lm(mpg ~ disp + hp + wt + qsec, data = mtcars) dfb <- dfbetas(model) n <- nrow(dfb) threshold <- 2 / sqrt(n) dbetas <- dfb[, 1] df_data <- tibble::tibble(obs = seq_len(n), dbetas = dbetas) d <- ols_prep_dfbeta_data(df_data, threshold) ols_prep_dfbeta_outliers(d)
#> # A tibble: 3 x 2 #> obs dbetas #> <int> <dbl> #> 1 9 0.448 #> 2 20 -0.358 #> 3 21 0.376