← All posts

Conditional vs. Marginal Odds Ratios: Why Your Logistic Regression May Be Lying to You

Clinical Epidemiology ResearchUniqcret doctor knowledgesData Analytics or Statistics

👩‍⚕️ The Situation

You’re analyzing your study: Did Drug A reduce the risk of infection compared to Drug B?

You run a logistic regression, adjust for age, sex, and comorbidities, and find an odds ratio (OR) of 2.5.

You interpret this as:

“Patients on Drug A are 2.5 times more likely to get infected.”

But here’s the twist:

❗ That OR isn’t the effect in your population. It’s the effect after adjusting for everything. And it doesn’t equal the overall population effect.


🔄 Meet the Two ORs

TypeWhat it really meansHow you get it
Conditional OROdds of outcome within covariate strata (e.g., same age, same sex)Logistic regression (standard output)
Marginal OROdds of outcome averaged across the populationRequires special methods (like G-computation or IPTW)


🧠 Why They’re Not the Same

Logistic regression is “non-collapsible.”Even if there’s no confounding, the adjusted OR (conditional) is still different from the marginal one.

That’s like saying:

“Even if no one's cheating, your class average will still change when you adjust for who sat in the front row.”

📉 In simpler terms:

🔬 Example

Suppose:

If you run logistic regression adjusting for a covariate, you might get:

➡️ Your model overstates the effect.


✅ What Should You Do?

If you need population-level impact:

Use methods that recover marginal effects:

If you just want risk prediction for individuals:

Standard logistic regression is fine. But don’t interpret the OR as a population effect.

💡 TL;DR

📎 Bonus: Cheat Sheet

ModelTarget EffectCollapsible?OK for Marginal?
LogisticConditional OR❌ No❌ Needs correction
Log-binomialRisk Ratio✅ Yes✅ Yes
Poisson (robust)Risk Ratio (approx)✅ Yes✅ Yes
Linear ProbabilityRisk Difference✅ Yes✅ Yes

👋 Got data and want to try this out? I can walk you through how to code G-computation or compare OR vs RR on your own dataset.

Just say the word.

Would you like this exported as a Markdown or formatted Word doc for your blog CMS?

Comments

No comments yet. Be the first to share your thoughts.

Sign in to comment