I am doing logistic regression in R on a binary dependent variable with only one independent variable. I found the odd ratio as 0.99 for an outcomes. This can be shown in following. Odds ratio is defined as, $ratio.odds(H) = \frac{P(X=H)}{1-P(X=H)}$. As given earlier $ratio.odds(H) = 0.99$ which implies that $P(X=H) = 0.497$ which is close to 50% probability. This implies that the probability for having a H cases or non H cases 50% under the given condition of independent variable. This does not seem realistic from the dataset as only ~20% are found as H cases. Please give clarifications and proper explanations of this kind of cases in logistic regression. What should I do further to solve this question?

  • 1
    $\begingroup$ Is there any chance you could post your output from R? $\endgroup$ – Kontorus Jun 20 '16 at 13:58
  • 2
    $\begingroup$ I'm not sure your interpretation of the odds ratio is correct. You show an odds, an odds ratio is the ratio of two odds. $\endgroup$ – gung - Reinstate Monica Jun 20 '16 at 14:03
  • $\begingroup$ Thanks Kontorous, I am hereby adding model summary and OR calculation. $\endgroup$ – Saurabh Sinha Jun 20 '16 at 16:34
  • $\begingroup$ glm(formula = H ~ X, family = binomial(), data = data) Deviance Residuals: Min 1Q Median 3Q Max -1.8563 0.6310 0.6790 0.7039 0.7608 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 1.6416666 0.2290133 7.168 7.59e-13 *** X -0.0014039 0.0009466 -1.483 0.138 --- Signif. codes: 0 '' 0.001 '' 0.01 '' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 1101.1 on 1070 degrees of freedom $\endgroup$ – Saurabh Sinha Jun 20 '16 at 16:38
  • $\begingroup$ Null deviance: 1101.1 on 1070 degrees of freedom Residual deviance: 1098.9 on 1069 degrees of freedom (667 observations deleted due to missingness) AIC: 1102.9 Number of Fisher Scoring iterations:4 $\endgroup$ – Saurabh Sinha Jun 20 '16 at 16:39

It seems like your interpretation of odds ratio (OR) is not correct $\frac{P(H = 1 | X)}{1 - P(H = 1 | X)} = \frac{P(H = 1 | X)}{P(H = 0 | X)}$ is an odd [$odds(X)$] not an odd ratio. The odds ratio would be $\frac{odds(X)}{odds(X')}$ where $X'$ is a new set of values for your predictors. It is impractical to have several predictors change values at the same time so the odds ratio is most often defined for $X'$ differing from $X$ by only one of its elements (if you see $X$ as a vector of values/predictors).

Consider the following logistic model :

$log (\frac{P(H = 1 | X)}{P(H = 0 | X)}) = \beta_0 + \beta_1x_1 +\beta_2x_2$

Then the OR of that model in regards to the variable $x_1$ would be $OR(x_1) = \frac{\frac{P(H = 1 | x_1 + 1, x_2)}{1 - P(H = 1 | x_1 + 1, x_2)}}{\frac{P(H = 1 | x_1, x_2)}{1 - P(H = 1 | x_1, x_2)}}$

You can see that $x_1$ takes two different values but every other variables stay the same. And because $x_1$ only increased by one you have the special case (actually the most common case when people are computing OR) where your OR is directly linked to your estimated parameters.

$OR(x_1) = \frac{e^{\beta_0 + \beta_1(x_1 + 1) +\beta_2x_2}}{e^{\beta_0 + \beta_1x_1 +\beta_2x_2}}$ which simplifies into $OR(x_1) = e^{\beta1}$. That is true with all parameters of your model.

So what $OR(x) = 0.99$ actually means is that for each 1 unit increase of $x$, everything else being kept the same, your odds is multiplied by $0.99$ ($e^{\beta1}$). So $0.99* odds(x) = odds(x + 1)$ which implies that $odds(x) > odds(x + 1)$ thus meaning that high values of $x$ are more prone to be met for $H = 0$.

Hopes it helps,

| cite | improve this answer | |
  • $\begingroup$ Nicolas, Thanks a lot! As i can understand from your answer that higher value of concerned covariate i.e the only independent variable that i am considering are more effective to reduce the probability of p(H=1). That is probability of occurrence of H adversely effected at higher values of x?? $\endgroup$ – Saurabh Sinha Jun 20 '16 at 16:58
  • $\begingroup$ That's right, an odds ratio is always computed in regards to a specific independent variable of the model (here you only have one). It is not as straightforward as the probability of H = 1 but rather as the increase of that probability (here it looks like it is a slight decrease, as X is growing P[H = 1] slowly decreases as odds(X -1) < odds(X). This is confirmed by your other comment where it is shown that the beta coefficient for X is negative, giving an hint that your sigmoid curve is decreasing over X. $\endgroup$ – Riff Jun 21 '16 at 7:21
  • $\begingroup$ Thanks Nicolas! But, what should i say regarding the "This does not seem realistic from the dataset as only ~20% are found as H cases" in the question? How to explain this? $\endgroup$ – Saurabh Sinha Jun 21 '16 at 17:41
  • $\begingroup$ This is not related to your OR, the way you derived P(H = 1| X) from your OR is not correct so the result you got is not as well ! And even though you compute for some individuals P(H = 1| X) > 0.2 that is totally normal as you are conditionning H on X ! That is you are computing "Given the profile X how sure am I that the response should be H = 1. It is unrelated to your fraction of obsrevations with H = 1 ?". It is a whole other issue and is more broadly related to how logistic regression works so it should have its own thread I think $\endgroup$ – Riff Jun 22 '16 at 6:34

Odds Ratios can be tricky to interpret sometimes, and I could try and explain it to you but I think this link would do the explanation better justice that I would: How do I interpret odds ratios in logistic regression?

As for the probability (which I am assuming you obtained through your log odds ratio), I think you need to delve into your data to see why you're seeing such a peak, it is most likely related to that. And also, you could calculate the change in log odds and change in odds for your independent variable to help you understand the changes per unit increase (also explained in the link above).

Hope that helps!

| cite | improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.