3

The most sources I know write the log-odds as $log[Pr(y=1|x)/Pr(y=0|x)]$, where

$Pr(y=1|x) = \frac{e^{\beta^T x}}{1+e^{\beta^T x}}$,

which eventually allows me to write the log-odds as

$\log\frac{Pr(y=1| x)}{Pr(y=0| x)} = \beta^T x$.

However, sometimes I found the reverse defintion. For example in the lecture notes of the Carnegie Mellon University, they define

$Pr(y=0|x) = \frac{e^{\beta^T x}}{1+e^{\beta^T x}}$

And hence get another odds-ratio. Bascially, they just swap the definitions. How is this to understand?

Patrick Balada
  • 609
  • 9
  • 16
  • 2
    maybe this will help (see ath the end, after EDIT): http://stats.stackexchange.com/questions/168637/logistic-regression-what-happens-to-the-coefficients-when-we-switch-the-labels/168641#168641 –  Jan 06 '16 at 14:09
  • 2
    This is easy to resolve when you consider that odds is always the odds *of some event*. Conventionally we're interested in the odds of $Y = 1$ but there's no reason why we can't look at $Y = 0$ instead. – dsaxton Jan 06 '16 at 14:19
  • Ok - I see that. So basically it depends on what I want to look at. But isn't it a problem when I estimate the model for example in R? Since the default is y=1? – Patrick Balada Jan 06 '16 at 14:25
  • 2
    the result is the same, except that the signs of the coefficients switch (which is expected), see EDIT at the bottom of http://stats.stackexchange.com/questions/168637/logistic-regression-what-happens-to-the-coefficients-when-we-switch-the-labels/168641#168641 –  Jan 06 '16 at 14:47

1 Answers1

1

Answered in comments, copied below:

This is easy to resolve when you consider that odds is always the odds of some event. Conventionally we're interested in the odds of Y=1 but there's no reason why we can't look at Y=0 instead. – dsaxton

the result is the same, except that the signs of the coefficients switch (which is expected), see EDIT at the bottom of Logistic regression: what happens to the coefficients when we switch the labels (0/1) of the binary outcome

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467