I'm trying to understand the way the odds of the reference groups are computed. Let's consider an example from this paper. Data can be summarised in the table:

enter image description here

The reference group is Older and New. The authors run a logistic regression model and found that:

So, exp(β0) = exp(−2.121) = 0.12 is the chance of death among those individuals that are older and received new treatment.

How can this chance of death (0.12) can be computed directly from the data? Why it's not just 6/34?



1 Answer 1


Essentially it's because of the way they parameterized the model. The model they used is

$$\log (\frac{\pi}{1-\pi}) = \beta_0 + \beta_1 X_{young} + \beta_2 X_{stand}$$

This model assumes that age and treatment have additive effects on the log odds of the outcome, meaning that whether you are old or young has no bearing on the effect of the treatment. It's not straightforward to compute the coefficients from the table because the effect of treatment "averages across" levels of age in a somewhat opaque way determined by the statistics behind how the coefficients are estimated. Rather than being directly computable from the table, the coefficients are estimated as those that make the data in the table most likely, again assuming additive effects of age and treatment. So the intercept represents the "model-implied" estimate of the log odds of the event for those that are older and received the new treatment.

The reason the model-implied estimate and the empirical (i.e., observed) odds ratio differ is that the model isn't saturated: three quantities were estimated, but there are four unique odds ratios (one for each combination of age and treatment). In a saturated model, the same number of quantities are estimated as there are combinations of the variables. A saturated model would be the following:

$$\log (\frac{\pi}{1-\pi}) = \beta_0 + \beta_1 X_{young} + \beta_2 X_{stand} + \beta_3 X_{young} X_{stand}$$

In this model, there are four quantities being estimated. This model doesn't assume that the effect of treatment is consistent across levels of age. It allows for an interaction between treatment type and age, which is what the $\beta_3$ term represents. In this model, $\exp(\beta_0)$ is indeed equal to the empirical odds for the older group who received the new treatment. The model fits the data perfectly in that the model-implied odds are exactly equal to the empirical odds for each of the four groups.

We can see this using R:

fit1 <- glm(state ~ age + treatment, data = d, 
            family = binomial, weights = count)

#>    (Intercept)       ageyoung treatmentstand 
#>     -2.1204648      0.4543151      1.3329042
#>    (Intercept)       ageyoung treatmentstand 
#>      0.1199759      1.5750942      3.7920402

fit2 <- glm(state ~ age + treatment + age:treatment, data = d, 
            family = binomial, weights = count)

#>             (Intercept)                ageyoung          treatmentstand 
#>              -1.7346011              -0.1016102               0.8906310 
#> ageyoung:treatmentstand 
#>               0.6397159
#>             (Intercept)                ageyoung          treatmentstand 
#>               0.1764706               0.9033816               2.4366667 
#> ageyoung:treatmentstand 
#>               1.8959421

#> [1] 0.1764706

Created on 2020-01-09 by the reprex package (v0.3.0)

fit1 is the model used in the paper. When we take $\exp(\beta_0)$ we get $.12$. fit2 is the saturated model with the interaction. If we take $\exp(\beta_0)$, we get $.176$, which is indeed equal to $6/34$.

  • $\begingroup$ That's a great and clear explanation. I wonder why I have never come across this issue in the textbook. It's a nice example of how model specification affects an interpretation of otherwise "easily interpretable "regression parameter. Thanks $\endgroup$
    – Lstat
    Jan 9, 2020 at 7:42

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.