Skip to content
Regression

Logistic regression

Model a binary outcome with one or more predictors.

All methods

Requirements

  • binary outcome after cleaning
  • predictor(s)
  • enough events per parameter

Avoid when

  • true multinomial/ordinal outcomes
  • complete separation
  • rare events without penalization

Formula

log[p/(1−p)] = Xβ

Interpretation

Exponentiated coefficients are odds ratios adjusted for included predictors.

Example use case

Model the probability of diabetes from age, BMI, and glucose.

Open example datasets