ols_prep_dfbeta_data: DFBETAs plot data

Description Usage Arguments Examples

Description

Prepares the data for dfbetas plot.

Usage

1
ols_prep_dfbeta_data(d, threshold)

Arguments

d

A tibble or data.frame with dfbetas.

threshold

The threshold for outliers.

Examples

1
2
3
4
5
6
7
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)
ols_prep_dfbeta_data(df_data, threshold)

cmlopera/olsrr documentation built on May 26, 2019, 10:34 a.m.