Semi-Synthetic Benchmarks
Notebook: tutorials/guides/03_semi_synthetic_benchmarks.ipynb
This tutorial uses the real Basque dataset as a baseline and injects synthetic treatment effects to benchmark all seven estimators across four treatment patterns under controlled conditions.
Topics covered
Dataset overview – the Basque economic panel (18 units, 43 time periods).
Semi-synthetic experiment –
run_experimentinjects a known ATT and evaluates each method’s relative error|tau* - tau_hat| / |tau*|.Treatment patterns – IID, Block, Staggered, Adaptive.
Summary visualisations – mean error heatmaps, box plots, and effect-size vs. accuracy scatter plots.
A/A test – verifies that estimators report near-zero effects when no treatment is applied.
Key functions
from causaltensor.semi_synthetic import run_experiment, run_aa_test
results = run_experiment(
dataset="basque",
method="DC-PR",
treatment_pattern="Block",
treatment_level=0.2,
n_trials=10,
seed=0,
)