31  Log odds, odds and odds ratios

In the previous chapter, you encountered log odds in the context of Bernoulli regression model. Log odds are the logarithm of the odds, as can be seen in the logit formula.

\[ \begin{aligned} \text{logit}(p) & = ln(odds)\\ \text{odds} & = \frac{p}{1-p} \end{aligned} \]

Remember that the model estimates, derived from the MCMC posterior draws, are on the log-odds scale. In the report of the model fitted in the previous chapter, we talked about differences in probability either as changes in percentage points or in log odds:

At 80% probability, the probability of a multi-verb predicate decreases by 11-22 percentage points from home-signers to NSL1 (\(\beta\) = -0.88 log odds, SD = 0.22), and increases by 25-36 points from NSL1 to NSL2 (\(\beta\) = +0.56 log odds, SD = 0.21).

Something that we glossed over in the previous chapter is that the same change in log odds corresponds to a different change in percentage points depending on the baseline probability. So for example a change in log odds of +1 corresponds to a change of about 23 percentage points when the baseline probability is 50% (approximately from 50% to 73%), but only about 3 percentage points when the baseline probability is 95% (approximately from 95% to 98%). This is why it is useful to not only report changes in log odds, but also in percentage points.

31.1 Odds ratios

Coefficients that indicate differences in log odds between two levels, like in the case of the NSL1 coefficient above \(\beta = -0.88\), can also be expressed as odds ratios. An odds ratio (OR) is the ratio of the odds of one level to the odds of the other level. One can obtain odds ratios from log odds by exponentiating the log odds.

TipOdds ratio

An odds ratio is the ratio between two odds and it is also the factor by which you multiply one odd to get the other.

Let’s go back to the model from Chapter 30.

library(tidyverse)
library(brms)
Warning: package 'Rcpp' was built under R version 4.6.1
library(posterior)

mvp_bm <- brm(
  Num_Predicates ~ Group,
  family = bernoulli,
  data = verb_org,
  cores = 4,
  seed = 1329,
  file = "cache/ch-regression-bernoulli_mvp_bm"
)

We can extract the draws as usual and calculate the odd ratios for NLS1 and NLS2. We also calculate the 80% CrIs of the odds ratios.

# Get draws
mvp_bm_draws <- as_draws_df(mvp_bm)

# Calculate posterior draws of odds ratios
mvp_bm_draws <- mvp_bm_draws |> 
  mutate(
    NSL1_OR = exp(b_GroupNSL1),
    NSL2_OR = exp(b_GroupNSL2),
  )

quantile2(mvp_bm_draws$NSL1_OR, c(0.1, 0.9)) |> round(2)
 q10  q90 
0.31 0.55 
quantile2(mvp_bm_draws$NSL2_OR, c(0.1, 0.9)) |> round(2)
 q10  q90 
1.35 2.29 

We could then report the results like this:

At 80% probability, the odds of a multi-verb predicate change by a factor of 0.31–0.55 from home-signers to NSL1 (\(\beta\) = -0.88 log odds, SD = 0.22), and change by a factor of 1.35–2.29 from NSL1 to NSL2 (\(\beta\) = +0.56 log odds, SD = 0.21).

Alternatively, odds ratio can be expressed as percent decrease with \((1 - OR) * 100\) when \(OR < 1\) and percent increase \((OR - 1) * 100\) when \(OR > 1\):

At 80% probability, the odds of a multi-verb predicate decreases by 45-69% from home-signers to NSL1 (\(\beta\) = -0.88 log odds, SD = 0.22), and increase by 35-129% from NSL1 to NSL2 (\(\beta\) = +0.56 log odds, SD = 0.21).

While it is useful to know about odds and odd ratios, I personally find talking about differences in percentage points more straightforward when dealing with the substantive interpretations of the results. I suggest that you stick to percentage points when reporting models results, while you learn the ropes of Bayesian regression models.

NoteQuiz 1
  1. How can a difference in log odds be converted into an odds ratio?

  2. How can an odds ratio be interpreted?

  3. Why can it be useful to report changes in percentage points alongside changes in log odds?

    True or false?

  4. An odds ratio greater than 1 indicates an increase in odds relative to the reference level.

  5. An odds ratio of 0.5 means that the odds have decreased by 50% relative to the reference level.

  6. A change of +1 in log odds always corresponds to the same change in percentage points, regardless of the baseline probability.