
Posterior-predictive line draws for a spaghetti overlay
Source:R/utils-ppc-features.R
ppc_overlay_draws.RdReturns the observed single-case series alongside a small number of posterior-predictive replicate series, shaped for a line-graph overlay colored by baseline vs intervention condition.
Usage
ppc_overlay_draws(model, data = NULL, n_lines = 20L, mode = c("same", "new"))Arguments
- model
A fitted
brmsfit.- data
Data holding the outcome, case, phase and (optional) time columns; defaults to the model's data.
- n_lines
Number of replicate series to return.
- mode
"same"replicates for the observed cases;"new"draws new case effects from the population posterior (allow_new_levels = TRUE) to assess generalization.