Description Usage Arguments Examples
View source: R/ols-plots-data.R
Prepares the data for dfbetas plot.
1 | ols_prep_dfbeta_data(d, threshold)
|
d |
A |
threshold |
The threshold for outliers. |
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 <- data.frame(obs = seq_len(n), dbetas = dbetas)
ols_prep_dfbeta_data(df_data, threshold)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.