Priors for hurdle models in brms

I am running a hurdle model using brms with the following code

# prior est for hurdle
sum(combin2$PA.y == 0) / length(combin$PA.y) # 0's occur 0.78
log(.22 / (1-.22))
# prior est for outcome 
log(mean(subset(combin2, PA.y > 0)$PA.y))

priors <- c(
  prior(normal(0, 1)),
  prior(normal(0, 1), dpar = "hu"), # Priors for regression coefficients
  prior(normal(-1.2, 0.25), class = "Intercept", dpar = "hu"), # Prior for the hurdle intercept
  prior(normal(7, 0.25), class = "Intercept")  ,     # Prior for the outcome intercept
)

fit <- brm(bf(PA.y ~ BB + K + BABIP + ISO +  GB + SwStr + wRC + Spd,
              hu ~ BB + K + BABIP + ISO +  GB + SwStr + wRC + Spd),
           data = combin2,
           family = hurdle_negbinomial(),
           prior = priors,
           chains = 4,
           iter = 2000)

print(fit)

I am getting mostly reasonable coefficients, however the hu_intercept coefficient is estimated to be 1.31, whereas the prior I set for it was N(-1.2,0.25). The mean of -1.2 was chosen because the PA.y column has 77% 0’s, and log(.23 / (1-.23)) = is -1.2. I guess my question is that I am surprised that when I specify a prior to be fairly tight around -1.2, that the final result is 1.31, and it makes me think that I am specifying something wrong in the brms code.

Thanks!

Data:
hurdle1.csv (359.4 KB)

Additionally, here is a model where the binary component has no predictors. I thought for sure there would be a negative intercept here, but there was not.

priors ← c(
prior(normal(0, 1)),
#prior(logistic(0, 1), dpar = “hu”), # Priors for regression coefficients
#prior(logistic(-1.2, 1), class = “Intercept”, dpar = “hu”), # Prior for the hurdle intercept
prior(normal(7, 1), class = “Intercept”) # Prior for the outcome intercept
)

fit ← brm(bf(PA.y ~ BB + K + BABIP + ISO + GB + SwStr + wRC + Spd,
hu ~ 1),
data = combin2,
family = hurdle_negbinomial(),
prior = priors,
chains = 4,
iter = 2000)

hu is the probability of being a zero, not the probability of clearing the hurdle.

1 Like