regression
Logistic regression
Model a binary outcome with one or more predictors.
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.
Worked example
Model the probability of diabetes from age, BMI, and glucose.
Open example datasets