Skip to contents

Sample parameter sets from a model's priors, simulate a dataset per draw, and summarize the resulting predictive distribution. Wraps the shared C++ PriorPredictiveCheck.

Usage

prior_predictive_check(
  data,
  distribution,
  number_of_draws = 1000L,
  sample_size = NULL,
  seed = 12345L
)

Arguments

data

numeric vector used to build the model (its priors are the check's target).

distribution

distribution family name.

number_of_draws

number of prior draws (default 1000).

sample_size

simulated dataset size per draw (default NULL, uses length(data)).

seed

PRNG seed.

Value

A named list: number_of_valid_draws and the predictive quantile summaries summary_mean_quantiles, summary_sd_quantiles, summary_min_quantiles, summary_max_quantiles (each [2.5, 25, 50, 75, 97.5]%).