Bayesian Models – Why It Is Appropriate to Model Demographics as Random Effects in Bayesian Multilevel Models

bayesianmultilevel-analysisrandom-effects-model

In Bayesian multilevel models (with, say, people nested within congressional districts) I sometimes see individual level demographic variables like race modeled as random effects.
So here’s a slightly simplifed example from this paper:
$$
Pr(y_i=1)=\text{logit}^{-1}(\gamma_0 + \alpha^{race}_{r[i]} +\alpha^{gender}_{g[i]}+\alpha^{edu}_{e[i]}+\alpha^{district}_{d[i]}…)$$

$$\alpha^{race}_{r[i]} \sim N(0,\sigma^2_{race}), for~r = 1,….4 $$
$$\alpha^{gender}_{g[i]} \sim N(0,\sigma^2_{gender}) $$
$$\alpha^{edu}_{e[i]} \sim N(0,\sigma^2_{edu}), for ~e=1,…,5
$$

As I understand it this model is treating all the individual level demographic variables as "random effects" just like district. So for race it is assuming that the 4 racial categories that exist in the data (black, white, hispanic, other) are actually just 4 random draws from a larger population of all possible races. To me this seems strange and wrong, since the racial categories we have in the data are meant to be exhaustive and there doesn’t seem to be any reason to think that racial differences will be normally distributed.

So my question is: Is my interpretation of this model correct, and if so why is it justified?

I know that someone actually asked this question before but the answer they were given was that it is probably NOT appropriate to treat race etc as random effects. But that's precisely what is done in many papers on Bayesian multilevel models.

Best Answer

I'd recommend looking at this answer from @Paul for guidance on so-called "random effects" and hierarchical models. In particular, this quote is on point:

Random effects are estimated with partial pooling, while fixed effects are not.

Partial pooling means that, if you have few data points in a group, the group's effect estimate will be based partially on the more abundant data from other groups. This can be a nice compromise between estimating an effect by completely pooling all groups, which masks group-level variation, and estimating an effect for all groups completely separately, which could give poor estimates for low-sample groups.

The answer goes on with an example, and discussion of the relationship of this approach to hierarchical Bayesian modeling.

Such pooling is exactly what the authors of the paper you cite were setting out to do with their multi-level approach:*

... a multilevel model pools group-level parameters towards their mean, with greater pooling when group-level variance is small and more smoothing for less populated groups. The degree of pooling emerges from the data endogenously ...

So although it's often argued that categories with few levels (sex, race) should be treated as fixed effects in regressions, they need to be treated as random effects to accomplish this partial pooling.


*The authors used GLMER in R for this, so I suppose this particular example isn't strictly a Bayesian approach.

Related Question