Ask Mallard

Logistic regression or Cox regression?

Distinguish an outcome at a fixed horizon from the timing of that outcome.

The decision

Define the outcome and horizon before choosing the model. Logistic regression models a binary outcome, such as whether readmission occurred by 30 days. Cox regression models the event hazard over follow-up using event times and risk sets. A dataset containing dates does not by itself make a hazard ratio the quantity the investigator wants.

When logistic regression can fit

A fixed-horizon binary analysis can be suitable when the outcome by that horizon is known for the analyzed participants and the odds ratio is the intended model summary. Logistic predictions can also support standardized risks under additional modeling choices. Coefficients are on the log-odds scale. Exponentiating the modeled log-odds contrast gives an odds ratio, not a risk ratio; outcome frequency does not change that interpretation.

When Cox regression can fit

Cox regression can use variable follow-up and right-censoring when the censoring assumptions are defensible and the hazard contrast answers the aim. Specify time zero, event coding, follow-up termination, treatment of delayed entry and proportional-hazards assessment. Repeated events, time-varying exposures and competing events need an appropriate explicit formulation.

Questions that settle the choice

  • Is the primary estimand a risk at a clinically defined time, or a hazard contrast over time?
  • Is outcome status known at the horizon for everyone? If not, how will censoring and missing ascertainment be handled?
  • Could the effect vary over time? A single proportional hazard ratio can conceal that pattern.
  • Does a competing event prevent the outcome? A cumulative-incidence target needs competing-risk methods; censoring competing deaths and using one minus Kaplan–Meier changes that target.

Follow-up against a fixed horizon

Four people followed toward a fixed horizon. One has the outcome before the horizon, one after it, one is followed past the horizon without the outcome, and one is censored before the horizon, whose status at the horizon is unknown and cannot be coded as event-free.An outcome by a fixed horizon, and what happens to someone censored before itHorizonOutcome before thehorizonOutcome after thehorizonNo outcome, followedpast the horizonCensored before thehorizonStatus at horizon unknownTimeLogistic regression needs outcome status at the horizon for everyone. Coding the censored person asevent-free is not a valid shortcut; a time-to-event method uses the time they were observed.Outcome occursFollow-up ends without the outcome (censored)
Conceptual diagram. It shows the structure of the idea, not data from any study.

Alternatives are legitimate

When absolute risks or restricted mean survival time better answer the question, choose an estimator for that quantity. Do not select logistic or Cox only because they are the two examples offered here. Neither an adjusted odds ratio nor a hazard ratio automatically supports a causal interpretation.

Record in the workspace

Record the event definition, prediction or effect horizon, time origin, censoring and competing-event rules, and the desired summary measure with this aim. Compare the models only before that scientific choice has been settled.

What to watch out for

Logistic odds ratios and Cox hazard ratios answer different questions. Coding someone censored before the horizon as event-free is not a valid shortcut.

Recent studies that used this
Searching PubMed…
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
  3. Survival analysis-part 2: Cox proportional hazards model (opens in a new tab) · Indian J Thorac Cardiovasc Surg · doi 10.1007/s12055-020-01108-7
  4. Survival Analysis and Interpretation of Time-to-Event Data: The Tortoise and the Hare (opens in a new tab) · Anesth Analg · doi 10.1213/ANE.0000000000003653
Prepared with AI assistance. Methodological and source checks are documented in this release; this is educational material, not independent professional approval. Reporting guidance supports transparent reporting and does not establish validity.
Last source review: 2026-09-09
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.