Please also provide the following information in addition to your question:

- Operating System: macOS Mojave 10.14.6
- rstanarm Version: 2.18.2

First, thank you to the developers of rstanarm, it’s such a user-friendly way to learn Bayesian statistics.

I have been unable to use the posterior_vs_predict function for rstanarm Poisson or Negative binomial models. I have read through the R documentation and googled but I still don’t understand why I can’t get it to work. In a recent statistics class, the teacher (on Linux, I believe same version of rstanarm) also encountered this problem. Is there something different I must call within this function for Poisson or Neg binomial models? For Gaussian or Binomial rstanarm models I normally use the below code with no issues:

posterior_vs_prior(rstanarm.model, pars = c(‘parameters specified by name’),

color_by = ‘vs’, group_by = TRUE, facet_args = list(scales = ‘free_y’))

Even keeping it simple, eg. posterior_vs_prior(rstanarm.model), this won’t work with a Poisson or Neg binomial model.

Thanks in advance!