Skip to contents

Returns 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.

Value

A list with observed and replicates data frames (columns case, time, condition, outcome, and draw for replicates); NULL if draws are unavailable.