Your panel
Paste a panel or load the example.
With no covariates, the pre-period outcome path itself is matched (every pre-period value is a predictor).
Result
treated synthetic leave-one-out
treated gap placebo gaps (screened)
Donor weights
| Donor | Weight |
|---|
Predictor balance
| Predictor | Treated | Synthetic | Donor mean | V |
|---|
Placebo runs, largest post/pre RMSPE ratio first
| Unit | Pre RMSPE | Post RMSPE | Ratio | Screen |
|---|
Method and citation
Let unit 1 be treated from period T0 on and units 2 to J+1 be donors. Collect k pre-intervention predictors (covariate averages and outcome values) in X1 for the treated unit and X0 for the donors, each scaled by its standard deviation. For a diagonal, non-negative V summing to one, the donor weights solve min over W of (X1 - X0 W)' V (X1 - X0 W) with W >= 0 and sum W = 1 (Abadie & Gardeazabal 2003). V is chosen to minimise the mean squared gap between the treated outcome and Z0 W(V) over the pre-period (the nested problem, solved by Nelder-Mead from equal weights), or by cross-validation: fit V with predictors from an early window against the outcome in a later one, then reuse it with predictors from the later window (Abadie, Diamond & Hainmueller 2015). The inner problem is solved exactly by a primal active-set method.
The effect in each post-period is the gap Y1t - sum_j W_j Yjt; the summary reports its average. Inference follows Abadie, Diamond & Hainmueller (2010): rerun the whole procedure with each donor as the treated unit (the real treated unit left out of the pool), compute each unit's ratio of post- to pre-period root mean squared prediction error (RMSPE), and report the treated unit's rank. The permutation p-value is rank / (J+1). The screen drops placebos whose pre-period MSPE is more than 20, 5 or 2 times the treated unit's, as in the paper's figures, since a placebo that never fit says nothing. Leave-one-out drops each donor with positive weight and refits (Abadie 2021 recommends it as a robustness check).
Verified by tests in the source against pysyncon 1.7.0 (MIT), an independent Python implementation whose own parity tests pin it to R's Synth: on the West Germany example the cross-validated weights agree within 0.01 (Austria 0.41, USA 0.22, Japan 0.16, Switzerland 0.11, Netherlands 0.10), the synthetic path within 0.5% in every year, and the average 1990-2003 gap within 1% (about -1,555 dollars per head). With the same V the inner solve gives pysyncon's weights within 0.002; on the nested and outcome-only fits it reaches a pre-period error at or below pysyncon's. The active-set solver is checked against brute-force enumeration of supports on 200 random problems, and planted-effect panels recover the planted weights and effect exactly.
Limits
- One treated unit. Several treated units need one run each, or a method built for staggered adoption.
- No interference. Donors must not have been affected by the intervention, by spillovers or by a similar policy of their own in the window.
- Convex hull. Weights are non-negative and sum to one, so a treated unit that is more extreme than every donor on a predictor cannot be matched; the tool warns when that happens.
- Small-sample inference. The placebo p-value can be no smaller than 1 / (J+1), and it is a rank, not a sampling-based standard error.
- Not modelled: bias-corrected or augmented synthetic control (Ben-Michael, Feller & Rothstein 2021), penalised weights, in-time placebos, conformal intervals and covariates measured after the intervention. Times must be numbers.
BibTeX
@article{abadie2003economic,
author = {Abadie, Alberto and Gardeazabal, Javier},
title = {The Economic Costs of Conflict: A Case Study of the Basque Country},
journal = {American Economic Review},
volume = {93}, number = {1}, pages = {113--132}, year = {2003},
doi = {10.1257/000282803321455188}
}
@article{abadie2010synthetic,
author = {Abadie, Alberto and Diamond, Alexis and Hainmueller, Jens},
title = {Synthetic Control Methods for Comparative Case Studies: Estimating the Effect of {California's} Tobacco Control Program},
journal = {Journal of the American Statistical Association},
volume = {105}, number = {490}, pages = {493--505}, year = {2010},
doi = {10.1198/jasa.2009.ap08746}
}
@article{abadie2015comparative,
author = {Abadie, Alberto and Diamond, Alexis and Hainmueller, Jens},
title = {Comparative Politics and the Synthetic Control Method},
journal = {American Journal of Political Science},
volume = {59}, number = {2}, pages = {495--510}, year = {2015},
doi = {10.1111/ajps.12116}
}
@article{abadie2021using,
author = {Abadie, Alberto},
title = {Using Synthetic Controls: Feasibility, Data Requirements, and Methodological Aspects},
journal = {Journal of Economic Literature},
volume = {59}, number = {2}, pages = {391--425}, year = {2021},
doi = {10.1257/jel.20191450}
}
@article{nelder1965simplex,
author = {Nelder, John A. and Mead, Roger},
title = {A Simplex Method for Function Minimization},
journal = {The Computer Journal},
volume = {7}, number = {4}, pages = {308--313}, year = {1965},
doi = {10.1093/comjnl/7.4.308}
}
Example data: GDP per capita and growth predictors for West Germany and 16 OECD countries, 1960-2003, from the replication data of Abadie, Diamond & Hainmueller (2015) as redistributed with pysyncon; provenance in data/SOURCE.md.
Questions
What does the synthetic control method answer?
What would have happened to one treated unit (a state, country, city, store or product line) without the intervention. It builds a weighted average of untreated units that tracks the treated unit before the intervention; the gap afterwards is the estimated effect.
What data do I need?
A long panel: one row per unit and period, with a unit column, a numeric time column and the outcome. You need one treated unit, several untreated comparison units that were not exposed to anything similar, and enough periods before the intervention for a good fit to mean something, ideally ten or more.
How is the p-value computed?
By placebo runs. Every donor is treated as if it had received the intervention, and the ratio of post- to pre-intervention fit error is computed for each. If the real unit has the largest ratio among J donors plus itself, the permutation p-value is 1 / (J + 1). With 16 donors the smallest possible p-value is 1/17, about 0.059.
What is V, and what does cross-validation change?
V says how much each predictor counts when matching the treated unit. By default it is chosen so the synthetic unit tracks the outcome as closely as possible before the intervention. Cross-validation, as in Abadie, Diamond and Hainmueller (2015), chooses V on an earlier training window and judges it on a later one, which guards against overfitting the pre-period.
When should I not trust the result?
When the pre-period fit is poor, when the treated unit lies outside the range of the donors on key predictors, when donors were affected by the same intervention or by spillovers, when another shock hit the treated unit at the same time, or when dropping one donor changes the answer completely.
How is this different from difference-in-differences?
Difference-in-differences compares the treated unit with an equally weighted control group and assumes parallel trends. Synthetic control chooses the weights from the data so the comparison tracks the treated unit before the intervention, and the weights are visible, non-negative and sum to one.
Is my data uploaded anywhere?
No. The file is read and analysed by JavaScript in this browser tab. There are no accounts, cookies or analytics vendors.