Choosing logistic regression or Cox regression
Logistic regression asks whether the outcome happened by a fixed time; Cox regression asks how fast it happens over follow-up, so the question and the follow-up decide.
Fit
When it matters, and when it does not
It matters when
- You must decide whether the question concerns outcome status at a fixed time or event timing.
- Follow-up differs between patients, so a simple fixed-horizon binary analysis may discard information.
It matters less when
- The outcome, horizon and analysis are already fixed. Check the chosen logistic model assumptions. Read: Logistic regression
- A survival analysis is already specified. Check censoring and proportional hazards for the Cox model. Read: Cox proportional hazards regression
Before you start
What to check in your study
- Whether you want a risk by a set time or a rate over timeoutcomeTypesummaryMeasureA risk at one year is a different quantity from a hazard ratio. Fix it before choosing a model.
- The fixed time, if there is oneSuch as 30 days after discharge. Choose it for a clinical reason, before seeing the data.
- Whether every patient's status at that time is knownIf some left before it, their status is unknown, and a method for censored data is needed.
- Whether another event can prevent the outcomecompetingEventsDeath before readmission is the usual one. It needs its own handling in either model.
- For logistic regression, outcome status at the fixed time is known for everyone analyzed.How to check: Count how many left before it, and why. If many did, a method for censored data uses the time they were followed.
- For Cox regression, patients who leave have the same outlook as similar patients who stay.How to check: Record why each patient left, and compare those censored early with those followed longer.
Plain language
How it works
Define the outcome and its time window before choosing the model. Logistic regression models whether the outcome happened by a fixed time, such as readmission within 30 days. Cox regression models the rate of the event over follow-up, using each patient's time at risk. A dataset with dates does not by itself make a hazard ratio the answer.
Logistic odds ratios and Cox hazard ratios answer different questions. Adding a prognostic factor can change either ratio even without confounding. That is non-collapsibility, not confounding. Choose the target quantity first. When risks at set times answer the question, estimate those directly rather than reading them from a hazard ratio.
Worked example
A worked example
- Setting
- 1,200 adults after hip fracture surgery, all followed for one year through a national death register.
- Question
- Is delirium after surgery linked to death within one year?
- Approach
- Everyone's status at one year is known, and the question is the risk by one year, so logistic regression fits. It adjusts for age and frailty.
- Result
- The adjusted odds ratio for death within one year, with delirium against without, was 2.
- What it means
- If 20 in 100 without delirium died, about 33 in 100 with delirium would. That is about 1.7 times the risk, not 2 times. This is an association.
In practice
Recent studies PubMed search · not vetted
Watch out
Common mistakes
The one to remember
Logistic odds ratios and Cox hazard ratios answer different questions. Coding someone censored before the horizon as event-free is not a valid shortcut.
- Reading a hazard ratio as a ratio of risks by the end of follow-up.Instead: It compares event rates over time. Report the risk in each group at stated times as well.
- Reading an odds ratio as a risk ratio when the outcome is common.Instead: They are close only when the outcome is rare. Convert to risks, or report a risk ratio or risk difference.
- Censoring deaths from other causes in a Cox model, then reading one minus survival as the risk.Instead: That overstates the risk. Use a competing-risks method to estimate the cumulative incidence.
- Choosing Cox regression only because the data hold dates.Instead: Dates do not make a hazard ratio the answer. Decide first whether you want a risk by a set time or a rate over time.
Inside Mallard
How Mallard uses this
Mallard's method list may include logistic regression for a yes-or-no outcome with an odds ratio, and Cox regression for time to an event with a hazard ratio. If competing events are recorded but the analysis never says how they are handled, Mallard warns. Plans do not link to it yet.
concept.choosing_logistic_cox, the id a plan cue records.Related Learn pages
Related designs and methods
Evidence
Sources & further reading
- Primer on binary logistic regression (opens in a new tab) · Fam Med Community Health · doi 10.1136/fmch-2021-001290
- Statistics notes. The odds ratio (opens in a new tab) · BMJ · doi 10.1136/bmj.320.7247.1468
- 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
- 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