placebo_in_time#
Placebo-in-time sensitivity check with hierarchical null model.
Builds a hierarchical Bayesian model of the “status quo” (no-effect) distribution from placebo folds, then compares the actual intervention effect against that learned null. Optionally computes Bayesian assurance (operating characteristics) against a user-supplied expected-effect prior.
Supports two fold-selection strategies:
sequential (default) — evenly-spaced sliding windows stepping backward from the actual treatment time.
random — randomly sampled eligible windows from the pre-intervention period, with constraints on minimum training fraction, minimum gap between folds, and optional period exclusion.
Supports experiments with a treatment_time parameter
(InterruptedTimeSeries, SyntheticControl). Requires a PyMC model
for posterior extraction.
Classes
Bayesian operating characteristics from design-level simulation. |
|
Result of a single placebo fold. |
|
Placebo-in-time sensitivity check with hierarchical null model. |