
Posterior Predictive Ribbon Plot
biPOD_ppc_ribbon.Rd
Creates a ribbon plot showing central credible intervals (CI) and outer intervals of the posterior predictive distribution. This plot helps visualize how well the model fits the observed data across a range of probability intervals. It can be used to assess the model's ability to capture the central tendency and variation in the data.
Arguments
- x
A
bipod
object containing a 'counts' field with the observed data. This is typically a time series or count data.- x_fit
A fitted model object containing posterior draws of the replicated data (
yrep
). This model should be fitted using Bayesian methods.- n
An integer specifying the number of posterior predictive draws to use in the plot. (default is 500). A higher value results in a more stable representation of the posterior distribution.
- prob
A numeric value between 0 and 1 representing the probability mass for the inner interval (e.g., the 50% CI). The default is 0.5.
- prob_outer
A numeric value between 0 and 1 representing the probability mass for the outer interval (e.g., the 90% CI). The default is 0.9.
Value
A ribbon plot created using bayesplot::ppc_ribbon
. The plot shows the posterior predictive distribution with shaded regions representing credible intervals at different probability levels.