Multilevel (mixed effects) model with zero-inflated beta family in brms

Data Description:
I have data about participants from multiple nations and want to predict each participant’s response variable as a function of participant gender and an aspect of culture measured on the nation-level. Because the response variable is bounded from 0 to 1 and has many zeros (and no ones), I want to use the zero_inflated_beta family.

Question 1:
When fitting such a model, should I include random effects on the zero-inflation part of the model? I would like to know if gender and culture are related to the likelihood of having a response of zero.

Option A (no random effects on z_i):

brm(
  formula = bf(
    response ~ 1 + gender * culture + (1 + gender | nation), 
    zi ~ 1 + gender * culture
  ),
  family = zero_inflated_beta,
  prior = c(
    set_prior("normal(0, 1)", class = "b"),
    set_prior("cauchy(0, 2)", class = "sd")
  ),
  data = out
)

Option B (random effects on z_i):

brm(
  formula = bf(
    response ~ 1 + gender * culture + (1 + gender | nation), 
    zi ~ 1 + gender * culture + (1 + gender | nation)
  ),
  family = zero_inflated_beta,
  prior = c(
    set_prior("normal(0, 1)", class = "b"),
    set_prior("cauchy(0, 2)", class = "sd")
  ),
  data = out
)

Question 2:
Any other advice or tips for this type of modeling? Thanks in advance.

  1. I see no reason not to try modeling random effects for the zero-inflation part.

  2. I am lacking subject matter knowledge in that area so I can’t give you any specific advice for
    how to model that data apart from what you already do.

1 Like

Maybe stating the obvious, but re Q1, if you strictly want to know if gender and culture are related to the likelihood of having a response of zero, you could code a variable is_zero = response == 0 and then do a logistic model?

brm(is_zero~ gender * culture, data=out, family=bernoulli(link='logit'))

This is without random effects. Without substance knowledge, I would say that the nesting of gender, nation, and culture is not self-evident.

That’s fair. The attractive aspect of ZIB over Bernoulli is that the former can give both the likelihood of having a response of zero and the relationship of non-zero responses to the predictors.

Regarding the appropriateness of the nesting, there are substantive reasons to expect that intercepts and gender effects on this response variable may differ by nation.