explain_logreg: Explain a binary target using a logistic regression (glm)....

View source: R/explain.R

explain_logregR Documentation

Explain a binary target using a logistic regression (glm). Model chosen by AIC in a Stepwise Algorithm (MASS::stepAIC()).

Description

Explain a binary target using a logistic regression (glm). Model chosen by AIC in a Stepwise Algorithm (MASS::stepAIC()).

Usage

explain_logreg(data, target, out = "tibble", ...)

Arguments

data

A dataset

target

Target variable (binary)

out

Output of the function: "tibble" | "model"

...

Further arguments

Value

Dataset with results (term, estimate, std.error, z.value, p.value)

Examples


data <- iris
data$is_versicolor <- ifelse(iris$Species == "versicolor", 1, 0)
data$Species <- NULL
explain_logreg(data, target = is_versicolor)


explore documentation built on Sept. 11, 2024, 7:40 p.m.