Ask Mallard

Logistic regression

Logistic regression models a binary outcome and estimates how predictors are associated with the odds of that outcome.

What question does this help answer?

“Which factors are associated with whether an event occurred, and what are the adjusted odds ratios?”

When to use it

Use binary logistic regression when the outcome has two states, such as readmission yes/no, disease present/absent, or treatment response yes/no.

When not to use it

If follow-up duration differs meaningfully and time-to-event information matters, survival analysis may be more appropriate. For common outcomes, odds ratios can differ substantially from risk ratios, so the estimand should be chosen deliberately.

How it works in plain language

The model relates predictors to the log odds of the outcome. Exponentiating a coefficient gives an odds ratio.

Why Mallard may recommend it

Mallard may recommend logistic regression when the plan has a binary primary outcome and adjustment for several predictors or confounders is needed.

Key assumptions

  • Observations are independent unless dependence is explicitly modeled.
  • Continuous predictors are modeled appropriately on the logit scale.
  • Severe multicollinearity and complete or quasi-complete separation are addressed.
  • The chosen predictors match the scientific objective.
  • Sufficient outcome events exist for the intended model complexity.

What to watch out for

An odds ratio is not the same as a risk ratio. Logistic regression can support prediction or association analyses, but a regression coefficient is not automatically a causal effect.

Clinical example

Model 30-day readmission as a function of care setting, age, comorbidity burden, and prior utilization.

How to interpret it

An adjusted odds ratio of 1.35 means the estimated odds of the outcome are 35% higher for that predictor contrast, conditional on the variables in the model. It does not mean risk is 35% higher.

What adjusted odds ratios look like

ExposureCovariate ACovariate B12
Illustrative placeholder. Every value in this figure is invented to show the shape of the result, and is not an estimate of anything.Only the exposure row estimates the effect of interest. The other rows are adjusted for a set chosen to identify the exposure effect, not their own, so reading them as effects is the Table 2 fallacy (Westreich and Greenland 2013).
Code for this method
Loading…
Recent studies that used this
Searching PubMed…
Work it out
Related Learn pages
Sources & further reading
  1. Primer on binary logistic regression (opens in a new tab) · Fam Med Community Health · doi 10.1136/fmch-2021-001290
  2. Statistics notes. The odds ratio (opens in a new tab) · BMJ · doi 10.1136/bmj.320.7247.1468
Last source review: 2026-09-05
AI-generated educational content
Mallard uses reputable methodological and reporting sources, but this material may contain errors or omit important context. Verify important methodological decisions with the cited sources and, when appropriate, a qualified research methodologist or statistician.