Skip to contents

Visualize how well the model predictions match observed data by comparing predicted vs observed outcomes.

Usage

plot_posterior_predictive(
  object,
  type = c("density", "intervals", "hist"),
  n_draws = 100,
  seed = NULL
)

Arguments

object

An mlumr_fit object

type

Type of check: "density" (overlay), "intervals" (with credible intervals), or "hist" (histogram comparison). Default is "density".

n_draws

Number of posterior draws to use for visualization. Default 100.

seed

Random seed for reproducibility. Default NULL.

Value

A ggplot object

Examples

if (FALSE) { # \dontrun{
# Density overlay
plot_posterior_predictive(fit)

# Histogram comparison
plot_posterior_predictive(fit, type = "hist")
} # }