problem_samples.log: Find Problem Samples within Training Dataset

Description Usage Arguments Value Examples

View source: R/problem_samples.R

Description

only supports binary logistic regression at this time. doesn't work when dfbeta(model) is included - recommend still looking at these values outside of this function

Usage

1
2
3
4
5
6
7
8
9
problem_samples.log(
  model,
  data,
  k,
  standard = 2,
  student = 2,
  df_fits = 1,
  cooks = 1
)

Arguments

model

the model to be used

data

TRAINING data set

k

number of predictors in model

standard

cut-off for standardized residuals- samples with values above abs(standard) will be returned

student

cut-off for studentized residuals - samples with values above abs(standard) will be returned

df_fits

cut-off for DFFITS - samples with values above abs(standard) will be returned

cooks

cut-off for cook's distance - samples with values above abs(standard) will be returned

Value

a data frame

Examples

1
2
3
4
5
## Not run: 
iris2 <- iris[stringr::str_detect(Species, "setosa", negate = T), ]
irismodel <- glm(Species ~ ., data = iris2, family = binomial)
problem_samples(irismodel, iris2, k = 4)
## End(Not run)

bmcguir8/mcguiR documentation built on Jan. 7, 2021, 8:40 p.m.