Each panel shows:
A histogram of the \(M\) posterior predictive draws of the test statistic \(T(\mathbf{y}^{\mathrm{rep}})\).
A solid red vertical line at the observed value \(T(\mathbf{y})\), annotated with its numeric value.
Dashed green vertical lines at the lower and upper bounds of the \((1-\alpha)\) posterior predictive interval.
A pass/fail indicator appears in the panel subtitle.
Usage
# S3 method for class 'hbb_ppc'
plot(x, type = NULL, ...)Arguments
- x
An object of class
"hbb_ppc"returned byppc.- type
Character string or
NULL; which statistic to plot. IfNULL(default), usesx$type. Otherwise one of"both","zero_rate","it_share".- ...
Additional arguments (currently unused).
Details
Produces a histogram of the posterior predictive draws for each
requested test statistic, overlaid with a vertical line at the
observed value. When type = "both", the two panels are
combined using patchwork.
ggplot2 Requirement
This function requires ggplot2 (and patchwork for
type = "both"). Both are in Suggests; they will be
checked via rlang::check_installed() and the user will be
prompted to install them if absent.
References
Gabry, J., Simpson, D., Vehtari, A., Betancourt, M., and Gelman, A. (2019). Visualisation in Bayesian workflow. Journal of the Royal Statistical Society: Series A, 182(2), 389–402.
See also
Other model-checking:
hbb_loo_compare(),
loo.hbb_fit(),
ppc(),
print.hbb_loo_compare(),
print.hbb_ppc()