PlaceboInTime.run#
- PlaceboInTime.run(experiment, context=None)[source]#
Run placebo-in-time analysis with hierarchical null model.
Creates
n_foldsplacebo experiments by shifting the treatment time backward. Extracts posterior cumulative impact from each fold, then fits a hierarchical Bayesian model to characterise the status-quo distribution. Compares the actual intervention effect against this null.When
expected_effect_priorwas provided at construction, also runs Bayesian assurance simulation.Can be used standalone (
context=None) whenexperiment_factorywas provided, or within a pipeline.- Parameters:
experiment (
BaseExperiment) – The fitted experiment whose treatment time will be shifted to generate placebo folds.context (
PipelineContext|None) – Pipeline context providingexperiment_configfor re-fits. IfNone, an explicitexperiment_factorymust have been supplied at construction time.
- Returns:
With
passedindicating whether the actual effect is clearly outside the null distribution, and rich metadata including the null samples and optional assurance results.- Return type: