Binomial Logistic Regression — odds ratios + ROC AUC + classification

Verified

Advanced & specialized

Independently verified. Every statistic this test reports has been re-derived against an independent reference — never the library the pipeline itself calls — the rendered output was read back in a browser, and the result is locked with a committed regression suite.

Run this test straight away on a free built-in teaching dataset — no data of your own needed — or bring your own. Either opens the guided workspace: variable setup, assumption diagnostics, results with effect sizes and confidence intervals, figures, and APA-ready reporting.

Loading teaching datasets…

Or use your own dataset

Loading your datasets…

Models the log-odds of a binary outcome as a linear combination of one or more predictors.

Reports coefficients (β with SE, z, p, 95% CI), per-predictor odds ratios with 95% CI, model fit (McFadden's pseudo-R², AIC, BIC, log-likelihood), Hosmer-Lemeshow goodness-of-fit OR modern calibration intercept-slope-ICI (TRIPOD-AI 2024), ROC AUC for discrimination, and a classification table at the default p ≥ 0.5 cut-point. The engine auto-checks separation, multicollinearity (VIF), linearity-of-logit for continuous predictors, and influential observations.

Worked example

Which factors predict whether a student passes?

Pass/fail (binary) was regressed on study hours and prior GPA for 200 students; logistic regression reports odds ratios.

Result

Each extra study hour raised the odds of passing by 38% (OR = 1.38, 95% CI [1.23, 1.56], p < .001); prior GPA also predicted passing (OR = 2.12). The model discriminated well, AUC = .78.

How you'd report it (APA)

A logistic regression showed study hours predicted passing (OR = 1.38, 95% CI [1.23, 1.56], p < .001), as did prior GPA (OR = 2.12); model AUC = .78.

Try it yourself: Load this ready-made sample and follow the run above.

When to use it

  • Case-control study (retrospective)
    Heart-disease cases (n = 200) vs matched controls (n = 200); predictors: age, cholesterol, smoking, BMI.
  • Prospective cohort with binary outcome
    1,000 employees followed for 2 years; outcome = burnout (yes/no); predictors = baseline stress, workload, support.
  • Cross-sectional classification / prediction model
    Predict pass/fail on a certification exam from study hours, practice scores, and years of experience in 800 historical examinees.

When NOT to — use instead

Hypotheses

H₀: β_j = 0 for all predictors (and overall LLR χ² = 0 for the model-fit test).
Hₐ: at least one β_j ≠ 0 (equivalently, OR_j ≠ 1).

Parameter tested: vector of population log-odds coefficients β

Assumptions (and what to do if they fail)

≥ 10 events (minority-class count) per predictor — Peduzzi et al. (1996) rule of thumb. With fewer events, coefficient estimates are unstable.high

Check: min(n_y0, n_y1) / k.

If violated: Insufficient events per predictor inflate OR uncertainty and can flip signs.

ROC AUC — area under the receiver operating characteristic curve. AUC < 0.6 = poor discrimination; ≥ 0.7 = acceptable; ≥ 0.8 = excellent.medium

Check: AUC value.

If violated: AUC ≈ 0.5 means the model has no discriminative power beyond chance.

Hosmer-Lemeshow goodness-of-fit test (10 deciles): p ≥ .05 indicates the model is well calibrated.medium

Check: Hosmer-Lemeshow p-value.

If violated: Poor calibration (p < .05) means predicted probabilities differ from observed event rates.

No single case dominates the fit (Cook's D and DFBETAS thresholds for logistic models).high

Check: Max Cook's D > 1 = severe; > 4/n = noteworthy.

If violated: Influential cases can flip OR signs in small samples.

VIF for each predictor in the OLS proxy is moderate (< 5 preferred; < 10 tolerable).medium

Check: Max VIF.

If violated: High VIF inflates OR standard errors and CIs.

Ready to run a Binomial Logistic Regression — odds ratios + ROC AUC + classification on your own data?

Guided setup, automatic assumption checks, effect sizes, figures and an APA write-up.

Run this test →