Plot the empirical probability mass function, i.e., the proportion of
data values y
that equal j
for each j=0,1,...
,
together with the model-based estimate of the probability mass function
based on the posterior predictive distribution.
plot_pmf(y, post.pred, error.bars = FALSE, alpha = 0.05)
A plot of the empirical PMF of y along with a PMF estimate from the model posterior predictive distribution
n x 1
vector of data
nsave
draws from the posterior predictive distribution of y
logical; if TRUE, include errors bars on the model-based PMF
confidence level for the credible intervals