View source: R/ols-plots-data.R
ols_prep_dfbeta_outliers | R Documentation |
Data for identifying outliers in dfbetas plot.
ols_prep_dfbeta_outliers(d)
d |
A |
model <- lm(mpg ~ disp + hp + wt + qsec, data = mtcars)
dfb <- dfbetas(model)
n <- nrow(dfb)
threshold <- 2 / sqrt(n)
dbetas <- dfb[, 1]
df_data <- data.frame(obs = seq_len(n), dbetas = dbetas)
d <- ols_prep_dfbeta_data(df_data, threshold)
ols_prep_dfbeta_outliers(d)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.