
Run Predictive Check (Prior or Posterior)
run_predictive_check.RdSimulates responses from the specified Nimble model using either priors or a provided posterior distribution matrix. Generates corresponding diagnostic plots.
Usage
run_predictive_check(
config,
obs_X,
posterior_samples = NULL,
n_sim = 50,
prefix = "Untitled",
title = "PPC"
)Arguments
- config
Model configuration list from
build_model_config.- obs_X
Numeric matrix of observed data to compare against.
- posterior_samples
Optional
mcmc.listor matrix of posterior samples. IfNULL, simulates priors.- n_sim
Numeric. Number of simulations to draw. Default is 50.
- prefix
Character or
NULL. Prefix for the output plot filename. IfNULL, plots render inline instead of saving to PDF.- title
Character. String used for labeling (e.g., "PriorPPC").