MethodAtlas
Method·advanced·6 min read
Design-BasedFrontier

Synthetic Difference-in-Differences

Combines the strengths of DiD (parallel trends) and synthetic control (matching on pre-treatment trajectory) into a single estimator.

When to UseWhen you have panel data and want an estimator that works well whether the data-generating process favors DiD or synthetic control, especially with multiple treated units.
AssumptionA weighted combination of the DiD and SC assumptions. Formally, the SDID estimator is consistent under a factor model that nests both DiD (equal unit weights) and SC (equal time weights) as special cases.
MistakeApplying SDID without understanding when it reduces to DiD or synthetic control as special cases, or using it when the number of pre-treatment periods is too small for the time-weight reweighting to work. Also, applying standard SDID to staggered treatment without modification.
Reading Time~6 min read · 11 sections · 6 interactive exercises

One-Line Implementation

Rsynthdid_estimate(Y, N0, T0) # synthdid package; Y = outcome matrix, N0 = n control units, T0 = n pre-periods
Statasdid outcome unit_id year treatment, vce(placebo) reps(200) seed(123)
Python# Use R's synthdid via rpy2, or manual implementation

Download Full Analysis Code

Complete scripts with diagnostics, robustness checks, and result export.

Motivating Example: State Employment Policy Evaluation

You are studying the effect of a state-level policy on employment. You have panel data for 50 states over 20 years. Ten states adopted the policy simultaneously.

DiD compares before-after changes in treated vs. control states, giving equal weight to all control states. But some control states are much more similar to the treated states than others.

Synthetic control constructs a weighted combination of control states to match each treated state's pre-treatment trajectory. But it is designed for a single treated unit and does not difference out common time effects the way DiD does.

What if you could get the strengths of both approaches?

Arkhangelsky et al. (2021) proposed (SDID), an estimator that combines unit weights (like synthetic control) with time weights (a novel addition) and includes an intercept shift (like DiD). The result is an estimator that tends to perform as well as or better than either component in a wide range of settings studied by the authors.


AOverview

SDID works in three steps:

  1. Unit weights (ω^\hat{\omega}): Choose weights on control units so the weighted control group matches the treated group's pre-treatment outcome trajectory — like synthetic control.

  2. Time weights (λ^\hat{\lambda}): Choose weights on pre-treatment periods so the weighted pre-treatment average matches the post-treatment control average. This weighting handles the insight that recent pre-treatment periods may matter more.

  3. Estimate the treatment effect using a doubly-weighted DiD-style regression.

When Does SDID Beat Its Components?

  • If parallel trends is exactly right and all controls are equally good, DiD and SDID give similar results.
  • If parallel trends fails but synthetic control matching is perfect, SC and SDID give similar results.
  • In the common intermediate case, SDID tends to outperform both in the simulations of Arkhangelsky et al. (2021).

Common Confusions

"Is SDID just synthetic control with an intercept?" Close, but not quite. SDID adds both an intercept shift (like DiD) and time weights (which neither DiD nor SC uses). The time weights focus on the most predictive pre-treatment periods.

"Does SDID work with staggered treatment?" The original paper focuses on non-staggered settings. Extensions to staggered treatment are still developing. For staggered treatment, consider the staggered adoption DiD estimators such as Callaway and Sant'Anna (2021).

"When should I use SDID vs. plain DiD?" In the settings studied by Arkhangelsky et al. (2021), SDID tends to perform at least as well as DiD. The main cost is complexity and the requirement for enough pre-treatment periods to estimate meaningful weights. If parallel trends is highly plausible and you have many similar units, plain DiD may be sufficient and more transparent. Conducting a sensitivity analysis on the parallel trends assumption can help you decide.


BIdentification

The SDID Estimator

SDID solves:

τ^SDID=argminτ,μ,α,βi=1Nt=1T(YitμαiβtτWit)2ω^iλ^t\hat{\tau}^{SDID} = \arg\min_{\tau, \mu, \alpha, \beta} \sum_{i=1}^{N} \sum_{t=1}^{T} \left(Y_{it} - \mu - \alpha_i - \beta_t - \tau W_{it}\right)^2 \hat{\omega}_i \hat{\lambda}_t

The unit weights ω^i\hat{\omega}_i solve:

ω^=argminω0,ωi=1YˉtrpreicoωiYipre22+ζ2Tpreω22\hat{\omega} = \arg\min_{\omega \geq 0, \sum \omega_i = 1} \left\| \bar{Y}_{tr}^{pre} - \sum_{i \in \text{co}} \omega_i Y_i^{pre} \right\|_2^2 + \zeta^2 T_{pre} \|\omega\|_2^2

The regularization ζ2\zeta^2 prevents overfitting, calibrated as ζ=(NtrTpost)1/4σ^\zeta = (N_{tr} T_{post})^{1/4} \hat{\sigma}.

The time weights λ^t\hat{\lambda}_t are chosen analogously, matching pre-treatment control averages to post-treatment control averages.

Identifying Assumptions

  1. No interference: One unit's treatment does not affect another unit's outcome.
  2. No anticipation: Treatment has no effect before implementation.
  3. Approximate parallel trends or approximate pre-treatment matching: SDID requires weaker conditions than either pure DiD or pure SC alone.

CVisual Intuition


DMathematical Derivation

Don't worry about the notation yet — here's what this means in words: SDID finds unit and time weights via separate optimization problems, then estimates the treatment effect using doubly-weighted regression. It reduces to DiD with equal weights and to SC without an intercept.

Connection to DiD and SC:

  • DiD: ωi=1/N0\omega_i = 1/N_0 (equal unit weights), λt=1/Tpre\lambda_t = 1/T_{pre} (equal time weights)
  • SC: ωi=ω^iSC\omega_i = \hat{\omega}_i^{SC} (matching weights), λt=1/Tpre\lambda_t = 1/T_{pre} (equal), no intercept shift
  • SDID: ωi=ω^iSDID\omega_i = \hat{\omega}_i^{SDID} (regularized matching weights), λt=λ^tSDID\lambda_t = \hat{\lambda}_t^{SDID} (data-driven time weights), with intercept shift

The SDID estimate can be written as a doubly-weighted DiD:

τ^SDID=(Yˉtrpost,λYˉtrpre,λ)(Yˉco,ωpost,λYˉco,ωpre,λ)\hat{\tau}^{SDID} = \left(\bar{Y}_{tr}^{post,\lambda} - \bar{Y}_{tr}^{pre,\lambda}\right) - \left(\bar{Y}_{co,\omega}^{post,\lambda} - \bar{Y}_{co,\omega}^{pre,\lambda}\right)

where the bars denote weighted averages.

Arkhangelsky et al. (2021) show that under a linear factor model, SDID has favorable asymptotic properties when both the number of units and time periods grow, achieving lower asymptotic variance than either DiD or SC alone under certain regularity conditions.


EImplementation

# Requires: synthdid
library(synthdid)

# --- Data Setup ---
# Y must be an N x T matrix with control units in the first N0 rows
# and treated units in the remaining rows.
# N0 = number of control units, T0 = number of pre-treatment periods.

# --- Step 1: Estimate Synthetic DiD ---
# synthdid_estimate() jointly optimizes unit weights (like SC) and
# time weights (unlike SC), then applies an intercept shift (like DiD).
# This double reweighting relaxes both parallel trends and exact matching.
tau_sdid <- synthdid_estimate(Y, N0, T0)

# --- Step 2: Standard Errors via Placebo Method ---
# vcov() with method="placebo" reassigns treatment to each control unit
# and re-estimates SDID — the distribution of placebos provides the SE.
# Requires enough control units (20+) for reliable inference.
se_sdid <- sqrt(vcov(tau_sdid, method = "placebo"))
cat("SDID:", tau_sdid, "(SE:", round(se_sdid, 3), ")\n")

# --- Step 3: Compare SDID with DiD and SC ---
# did_estimate uses equal unit weights (standard two-way DiD).
tau_did <- did_estimate(Y, N0, T0)
# sc_estimate uses synthetic control weights without intercept adjustment.
tau_sc <- sc_estimate(Y, N0, T0)
# Agreement across estimators = robust; disagreement = sensitive to assumptions.
cat("DiD:", tau_did, "\nSC:", tau_sc, "\nSDID:", tau_sdid, "\n")

# --- Step 4: Visualization ---
# Plots treated vs. SDID counterfactual trajectory and the unit/time weights.
# Pre-treatment fit should be close; post-treatment gap = the effect.
plot(tau_sdid)
Requiressynthdiddid

FDiagnostics

  1. Report unit weights. If approximately equal, SDID behaves like DiD. If concentrated, it behaves like SC.
  2. Report time weights. Concentrated time weights indicate that recent pre-treatment periods dominate.
  3. Pre-treatment fit. Compare weighted control trajectory to treated trajectory pre-treatment.
  4. Compare DiD, SC, and SDID. Report all three. Agreement strengthens credibility.
  5. Placebo inference. Reassign treatment to control units and re-estimate to construct standard errors. This approach is analogous to randomization inference in experimental settings.

Interpreting Your Results

All three estimators agree: Very strong evidence. Robust to different assumptions.

SDID and SC agree but DiD differs: Parallel trends may be violated; pre-treatment matching is doing the work.

SDID and DiD agree but SC differs: SC may be overfitting; SDID's regularization stabilizes the estimate.


GWhat Can Go Wrong

What Can Go Wrong

Applying SDID to Staggered Treatment Without Modification

Recognize that all 10 treated states adopt the policy simultaneously (a single treatment date) and apply standard SDID. Alternatively, if adoption is staggered, use a staggered extension or apply SDID separately by cohort.

SDID estimate: 2.8 (SE = 0.7). The single treatment date aligns with the original SDID framework, and the estimate is consistent with DiD (2.1) and SC (3.5), falling between them as expected.

What Can Go Wrong

Poor Pre-Treatment Fit with Too Few Donor Units

Use a donor pool of 40 control states with similar economic structures. SDID constructs unit weights that closely match the treated states' pre-treatment trajectory.

Pre-treatment RMSPE: 0.15. The weighted control trajectory closely tracks the treated states before policy adoption. SDID estimate: 2.8 (SE = 0.7).

What Can Go Wrong

Anticipation Effects Biasing the Time Weights

The policy is announced and implemented simultaneously in 2010. Pre-treatment periods genuinely reflect the no-treatment counterfactual.

SDID estimate: 2.8 (SE = 0.7). Time weights spread across pre-treatment periods with modest concentration on 2008-2009, reflecting the most predictive recent history.


HPractice

Concept Check

You estimate DiD (2.1, SE 0.8), SC (3.5, SE 1.2), and SDID (2.8, SE 0.7). SDID unit weights concentrate on 5 of 40 control units; time weights concentrate on the last 3 of 10 pre-treatment periods. What do these patterns suggest?

Concept Check

How does the Synthetic Difference-in-Differences (SDID) estimator combine elements of DiD and synthetic control?

Guided Exercise

Synthetic DiD: California's Paid Family Leave and Female Employment

A researcher uses Synthetic DiD to estimate the effect of California's 2004 Paid Family Leave (PFL) law on female employment rates. California is the only treated state. She uses annual employment data from 1995 to 2010 and constructs both unit weights (to find states whose pre-2004 employment trends best match California) and time weights (to identify which pre-treatment years are most informative for predicting the counterfactual).

How does Synthetic DiD improve on standard DiD in this setting?

What do the unit weights (omega) achieve in SDID?

What do the time weights (lambda) achieve in SDID?

How does SDID handle the case where simple DiD finds a significant effect but Synthetic Control finds none?

Error Detective

Read the analysis below carefully and identify the errors.

A policy researcher uses SDID to estimate the effect of a minimum wage increase on teen employment across 8 states that raised their minimum wage in 2015. Using annual data from 2005-2019 and 42 control states, she reports: "SDID estimate: -1.8 percentage points (SE = 0.6, p = 0.003). We use the synthdid package in R with default settings." She writes: "The pre-treatment fit is excellent (see Figure 2)." She does not report DiD or SC estimates for comparison. She also notes: "Three of our control states raised their minimum wage in 2017, but we include them as controls for the full period since their increase came after our treatment date."

Select all errors you can find:

Error Detective

Read the analysis below carefully and identify the errors.

A trade economist estimates the effect of a trade agreement on bilateral exports using SDID. He has 25 country pairs affected by the agreement and 200 control pairs, with quarterly data from 2000-2020. He reports: "SDID estimate: 18% increase in bilateral exports (SE = 4%, p < 0.001). Unit weights are highly concentrated: the top 3 control pairs receive 85% of the total weight." He writes: "The concentrated weights demonstrate that SDID successfully identifies the most comparable control pairs." He uses placebo-based inference with 200 placebo reassignments."

Select all errors you can find:

Referee Exercise

Read the paper summary below and write a brief referee critique (2-3 sentences) of the identification strategy.

Paper Summary

The authors estimate the effect of recreational marijuana legalization on property crime rates using SDID. They study 4 states that legalized in 2014, using 30 control states and annual data from 2000-2019. They report that legalization reduced property crime by 12% (SE = 3.5%). They compare SDID to DiD (-5%, SE = 4.2%) and SC (-18%, SE = 6.1%), arguing that SDID provides the best estimate because it combines the strengths of both.

Key Table

EstimatorEstimateSE95% CI
DiD-5.0%4.2%[-13.2%, 3.2%]
SC-18.0%6.1%[-30.0%, -6.0%]
SDID-12.0%3.5%[-18.9%, -5.1%]
Unit weights: top 5 of 30 control states receive 72% of weight
Time weights: 2012-2013 receive 65% of weight
Pre-treatment RMSPE: 0.42 (SDID), 0.38 (SC), 1.85 (DiD)

Authors' Identification Claim

SDID provides the best estimate because it combines DiD's time differencing with SC's unit matching. The small standard error confirms its efficiency advantage.


ISwap-In: When to Use Something Else

  • Canonical DiD: When parallel trends is credible without unit reweighting — standard DiD is simpler and may suffice.
  • Synthetic control: When there is a single treated unit and the donor-pool approach is more transparent — SC is the original method on which SDiD builds.
  • Staggered DiD: When treatment timing varies across units — SDiD as originally proposed handles simultaneous adoption more naturally than staggered settings.
  • Event studies: When the full time profile of dynamic treatment effects is of primary interest rather than a single aggregate treatment effect.

JReviewer Checklist

Critical Reading Checklist

0 of 6 items checked0%

Paper Library

Foundational (8)

Abadie, A., Diamond, A., & Hainmueller, J. (2010). Synthetic Control Methods for Comparative Case Studies: Estimating the Effect of California's Tobacco Control Program.

Journal of the American Statistical AssociationDOI: 10.1198/jasa.2009.ap08746

Abadie, Diamond, and Hainmueller formalize and popularize the synthetic control method, which constructs a weighted combination of control units to approximate the counterfactual for a single treated unit. The application to California's Proposition 99 tobacco control program becomes the canonical example of the method.

Arkhangelsky, D., Athey, S., Hirshberg, D. A., Imbens, G. W., & Wager, S. (2021). Synthetic Difference-in-Differences.

American Economic ReviewDOI: 10.1257/aer.20190159

Arkhangelsky et al. introduce the synthetic difference-in-differences estimator, which combines the strengths of DID (parallel trends assumption) and synthetic control (re-weighting to improve pre-treatment fit). The method uses both unit weights and time weights to construct a more credible counterfactual, and provides valid inference without requiring a large donor pool.

Arkhangelsky, D., & Imbens, G. W. (2022). Doubly Robust Identification for Causal Panel Data Models.

Econometrics JournalDOI: 10.1093/ectj/utac019

Arkhangelsky and Imbens develop doubly robust identification strategies for causal panel data models, combining outcome modeling with re-weighting to provide consistent estimates if either the outcome model or the weighting scheme is correctly specified. The framework is broader than synthetic DID specifically but directly relevant to it, strengthening the theoretical foundations for panel-data treatment effect estimation.

Ben-Michael, E., Feller, A., & Rothstein, J. (2021). The Augmented Synthetic Control Method.

Journal of the American Statistical AssociationDOI: 10.1080/01621459.2021.1929245

Ben-Michael, Feller, and Rothstein propose augmenting the synthetic control estimator with an outcome model to reduce bias when the synthetic control does not achieve perfect pre-treatment fit. The resulting doubly robust estimator is consistent if either the outcome model or the weighting is correct, providing a practical improvement for applied synthetic control studies.

Ben-Michael, E., Feller, A., & Rothstein, J. (2022). Synthetic Controls with Staggered Adoption.

Journal of the Royal Statistical Society: Series BDOI: 10.1111/rssb.12448

Ben-Michael, Feller, and Rothstein extend synthetic control and synthetic DID methods to staggered adoption settings where multiple units adopt treatment at different times. They demonstrate the approach by estimating the effects of teacher collective bargaining laws on school spending across U.S. states, showing how synthetic DID-style reweighting improves counterfactual estimation when treatment rolls out over time.

Callaway, B., & Sant'Anna, P. H. C. (2021). Difference-in-Differences with Multiple Time Periods.

Journal of EconometricsDOI: 10.1016/j.jeconom.2020.12.001

Callaway and Sant'Anna propose group-time average treatment effects (ATT(g,t)) that avoid the problematic comparisons in TWFE. Their framework allows for heterogeneous treatment effects across groups and time and provides aggregation schemes for summary parameters.

Clarke, D., Pailanir, D., Athey, S., & Imbens, G. (2024). On Synthetic Difference-in-Differences and Related Estimation Methods in Stata.

Clarke and colleagues develop the sdid Stata package for implementing synthetic DID, providing detailed documentation and empirical examples. This paper makes the method accessible to applied researchers and demonstrates implementation with real policy evaluation data.

Porreca, Z. (2022). Synthetic Difference-in-Differences Estimation with Staggered Treatment Timing.

Economics LettersDOI: 10.1016/j.econlet.2022.110874

Porreca extends the synthetic DID estimator to staggered treatment adoption settings, where multiple units adopt treatment at different times. The method constructs a localized estimator in which treated units are compared to a never-treated control group weighted on both the time and unit dimensions.

Survey (1)

Roth, J., Sant'Anna, P. H. C., Bilinski, A., & Poe, J. (2023). What's Trending in Difference-in-Differences? A Synthesis of the Recent Econometrics Literature.

Journal of EconometricsDOI: 10.1016/j.jeconom.2023.03.008

Roth et al. synthesize the explosion of recent econometric work on DID in this comprehensive survey, covering staggered treatment timing, heterogeneous treatment effects, pre-trends testing, and new estimators. It is the essential starting point for understanding the modern DID literature.

Tags

design-basedpanelfrontier