5
$\begingroup$

Suppose we've ran a logistic regression on some data where all predictors are nominal. With dummy coding the coefficients are ratios of log odds to the reference levels. A colleague claims that we can "solve for $p$" or "apply the inverse logit to the estimated parameters" interpret the result as relative probabilities, but my intuition tells me that the logit function isn't so well behaved. See the more concrete example below:

mydata<-data.frame(outcome = rbinom(1000, 1, 0.3),
                     Race=sample(c("White", "Black", "Hispanic", "Other"), 1000, replace=TRUE), 
                     Gender=sample(c("M", "F"), 1000, replace=TRUE))                    
myglm <- glm(outcome ~ Race + Gender, family=binomial(), data=mydata)
x <- summary(myglm)$coefficients[,1]
cbind(coef_log_odds = x, coef_prob = exp(x) / (1 + exp(x)) * 2)

#              coef_log_odds coef_prob
# (Intercept)    -1.09760895 0.5003763
# RaceHispanic    0.18458782 1.0920327
# RaceOther       0.08886623 1.0444039
# RaceWhite       0.04471730 1.0223549
# GenderM         0.40350628 1.1990596

We see that coef_prob for GenderM is 1.199. Can this be interpreted as "holding all else fixed, males are 1.2 times as likely as females to have outcome1"?

$\endgroup$
1

1 Answer 1

7
$\begingroup$

The relation between odds & probabilities is non-linear, so a model with a constant odds ratio between males & females doesn't translate into one with a constant probability ratio (a.k.a. relative risk) between males & females—the latter depends on the intercept & values of other predictors. And you apply the inverse logit function to get a probability from an odds, not to get a probability ratio from an odds ratio.

Here the probability ratio between black males & black females is

$$\frac{\frac{\exp (-1.0976 + 0.4035)}{1 + \exp (-1.0976 + 0.4035)}}{ \frac{\exp (-1.0976)}{1 + \exp (-1.098)}}\approx 1.331$$

while that between Hispanic males & Hispanic females is

$$\frac{\frac{\exp (-1.0976 + 0.1846 + 0.4035)}{1 + \exp (-1.0976 + 0.1846 + 0.4035)}}{ \frac{\exp (-1.0976+ 0.1846 )}{1 + \exp (-1.098+ 0.1846)}}\approx 1.311$$

If you had another race with a large odds ratio the probability ratio could be very different.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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