Posterior_epred with zero inflated count model

Hi all, I have not used/looked at brms in years, and have a very simple/stupid question about posterior predictions from using the package that I have not been able to find an answer to elsewhere.

I have a model with the following form:

brm(bf(count ~ offset(LogOff)+X*Factor+(X*Factor|Species)+

What I’d like to do is compare the posterior of the expected value across X and Factor, using something like posterior_epred(mod, newdata , re_formula~(1+X*Factor|Species).

What is not clear to me is whether the call to posterior_epred above is taking into the product of the zero inflated and NB components, which I’m looking for, or just the NB component)? I can also imagine interest in distinguishing between the two, and just for my own clarification, I assume this would be accomplished with dpar=“mu” or dpar=“zi”?

Apologies again for the very fundamental question, and thanks for any clarification.


It is doing the correct thing and producing the draws from posterior of expectation of the predictive distribution. In cases where the correct thing is not yet implemented, there is a clear error message.

This one I don’t know

1 Like

Thank you!