In school, long before learning about logistic models, I've been taught how to calculate odds ratios by hand.

Formula was based on a contingency table, just like this: contingency table and oddsratio formula

This is very easy to understand for categorical variables (even with 3+ levels by one-hot encoding), but for a continuous variable a logistic model would give me an OR "for a predictor increase of 1".

What would be the odds ratio calculation for such a continuous variable ?

EDIT: this is a question of curiosity, aiming at better understanding the logic behind models I fit daily

  • $\begingroup$ Is there a reason you'd rather not just fit the model and take the antilog of the estimate? $\endgroup$ – LSC Mar 15 '19 at 13:03
  • 1
    $\begingroup$ this question is about understanding, not performing. I think knowing how to calculate something is often a very good way to understand it. $\endgroup$ – Dan Chaltiel Mar 15 '19 at 13:12
  • $\begingroup$ This explains the basic idea for a discrete independent variable. $\endgroup$ – Penguin_Knight Mar 15 '19 at 13:31
  • $\begingroup$ @Penguin_Knight so the answer is that unlike for categorical variables, you cannot really calculate such an odds ratio without fitting a logistic regression ? $\endgroup$ – Dan Chaltiel Mar 15 '19 at 13:37
  • $\begingroup$ If you're talking about something as simple as ad/bc, then you're correct that there is no such shortcut. $\endgroup$ – Penguin_Knight Mar 15 '19 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.