Logistic Regression
Logistic Regression models a binary outcome (0/1) against one or more covariates, producing odds ratios for each predictor. The workhorse of clinical research for any yes/no outcome.
Step 1 — Provide your data
- Outcome — binary (0 or 1)
- Covariates — numeric or categorical predictors
Supports Excel Import (with ColumnSelector and CategoryMapper), Sample Data Selector, and Manual Entry.
Step 2 — Choose reference categories
For categorical covariates, pick the baseline. ORs are reported relative to this reference.
Step 3 — Results
Covariate table:
- Coefficient (beta), OR = exp(beta), 95% CI, SE, Z-score, p-value
Model Fit:
- Log-likelihood, Null/Residual deviance
- Chi-square (LR test), df, overall p-value
- McFadden's pseudo R-squared
- Nagelkerke's R-squared
- AIC, BIC
Hosmer-Lemeshow test — goodness-of-fit (10 deciles, df=8)
Predictive accuracy — classification at p=0.5 cut-off
AUC with 95% CI
Visualisations:
- Odds Ratio Forest Plot
- Predicted probability distributions
A UniversalChatBot is available for discussion.
Statistical methods used
Model
log(p/(1-p)) = beta0 + beta1*X1 + ... + betap*Xp
Estimation — Newton-Raphson/IRLS
- Max iterations: 50
- Convergence: max |score| < 1e-8
- Ridge regularisation (1e-8) for stability
Odds Ratios with 95% CI (Wald)
OR = exp(beta), CI: exp(beta +/- 1.96 * SE)
Overall model — Likelihood Ratio Test
chi2 = 2 * (logL_full - logL_null) with df = p.
Pseudo R-squared
- McFadden:
1 - (logL_full / logL_null) - Nagelkerke: Cox-Snell scaled to max 1
Hosmer-Lemeshow
10-decile goodness-of-fit. p > 0.05 indicates good calibration.
Pre-flight checks: minimum 10 observations, minimum 5 events and 5 non-events, perfect-separation detection.