-
-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Description
Currently, the ppd_* functions are essentially the ppc_* functions without the y (observed data).
However, this isn't "the" (marginal) PPD - it shows individual replications:
library(bayesplot)
library(ggplot2)
set.seed(20260225)
mu_posterior <- rnorm(100, mean = 3, sd = 1)
sigma_posterior <- rgamma(100, shape = 2, rate = 1)
ypred <- t(mapply(rnorm, mu_posterior, sigma_posterior, n = 50))
ppd_dens_overlay(ypred) +
ggtitle("Replications of the posterior predictive distribution")ppd_dens_overlay(ypred) +
geom_density(aes(group = NA), linewidth = 1) +
ggtitle("Replications of the posterior predictive distribution + marginal PPD")Created on 2026-02-25 with reprex v2.1.1
It would be useful to allow the ppd_* functions to show the PPD (in addition to or instead of the individual replications).
E.g., this last plot (IMO) provides a good visualization of the epistemic vs aleatoric uncertainty in the PPD.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

