Comparison of Augmented Synthetic Control Method (ASCM)
This notebook compares the implementation of Augmented Synthetic Control in causalis and pysyncon.
This notebook presents the ascm comparison research workflow and key analysis steps.
Data Generation
We use the generate_scm_gamma_26 function to generate synthetic panel data.
Result
Ground-truth ATTE is 1.919269
| unit_id | calendar_time | treated_time | y | y_cf | tau_realized_true | mu_cf | mu_treated | tau_mean_true | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | donor_1 | 2000-01 | 0 | 9.971611 | 9.971611 | 0.0 | 10.059081 | 10.059081 | 0.0 |
| 1 | donor_1 | 2000-02 | 0 | 10.344379 | 10.344379 | 0.0 | 10.097467 | 10.097467 | 0.0 |
| 2 | donor_1 | 2000-03 | 0 | 10.998498 | 10.998498 | 0.0 | 11.354098 | 11.354098 | 0.0 |
| 3 | donor_1 | 2000-04 | 0 | 11.508717 | 11.508717 | 0.0 | 11.277716 | 11.277716 | 0.0 |
| 4 | donor_1 | 2000-05 | 0 | 11.125281 | 11.125281 | 0.0 | 10.098791 | 10.098791 | 0.0 |
CKit (causalis) ASCM
We use the AugmentedSyntheticControl model with lambda_aug=50.
Result
Causalis ATTE: 3.945634
| value | |
|---|---|
| field | |
| estimand | average_post_effect |
| model | AugmentedSyntheticControl |
| inference | average_att_ttest |
| value | 3.9456 (ci_abs: 0.3664, 7.5249) |
| value_relative | 16.0707 (ci_rel: 1.4922, 30.6491) |
| alpha | 0.0500 |
| p_value | 0.0417 |
| is_significant | True |
| post_outcome_d_mean | 28.3185 |
| pointwise_post_period_average | 3.7668 |
| effect_by_time | [{'period': 2003-02, 'estimate': 3.32949405792... |
| cumulative_effect | 22.6007 |
| n_significant_periods | 0 |
| n_donors | 40 |
| n_pre_periods | 37 |
| n_post_periods | 6 |
| time | 2026-03-14 |
PySyncon ASCM
We prepare the Dataprep object and fit the AugSynth model.
Result
PySyncon ATTE: 3.766599
Results Comparison
Result
Method ATTE Error 0 Ground Truth 1.919269 0.000000 1 Causalis 3.945634 2.026365 2 PySyncon 3.766599 1.847330
Explanation of Discrepancies
The estimates differ because:
- Time Period Alignment:
causalisautomatically correctly identifies the pre-treatment period for the treated unit. Inpysyncon, manually specifyingpre_periodsrequires filtering by the treated unit to avoid including periods where donors are "pre-treatment" but the treated unit is already treated. - De-meaning (Intercept):
pysynconperforms row-wise (cross-sectional) de-meaning by the donor average at each time point before applying Ridge. This effectively includes a time-specific intercept . This also alters the direction of the Ridge penalty. - Constraint Specification:
causalisexplicitly enforces the sum-to-one constraint on augmented weights via a Lagrange multiplier in the original space, whilepysynconrelies on cross-sectional de-meaning to satisfy the constraint (which is mathematically equivalent to solving with an intercept).