MethodAtlas
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.

Quick Reference

When to Use
When 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.
Key Assumption
A 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.
Common Mistake
Applying 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.
Estimated Time
2.5 hours

One-Line Implementation

Stata: sdid outcome unit_id year treatment, vce(placebo) reps(200) seed(123)
R: synthdid_estimate(Y, N0, T0) # synthdid package; Y = outcome matrix, N0 = n control units, T0 = n pre-periods
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

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)

Arkhangelsky et al. (2021) proposed Synthetic Difference-in-Differences (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.

A. Overview

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.

B. Identification

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.

C. Visual Intuition

Interactive Simulation

SDID vs. DiD vs. Synthetic Control

Compare three estimators. Adjust the degree of parallel trends violation and the quality of the synthetic control fit. See when SDID outperforms each component.

011.3822.7634.14Simulated ValueParallel Tr…Synthetic C…True Treatm…Number ofParameters
05
01
-55
10100
Interactive Simulation

Why Synthetic DiD?

Panel DGP: 10 control units + 1 treated unit, 20 periods (treatment at T=12). True effect = 3.0. Pre-treatment fit quality = 0.5. SC uses 3 units with positive weight; SynDiD also up-weights 4 key time periods.

Treatment-7.6-1.64.410.416.4Time PeriodOutcome YEffectUnit Weights (SC/SynDiD)0.200.090.72
Treated unitSynthetic controlControl units

Estimation Results

Estimatorβ̂SE95% CIBias
Standard DiD1.5110.156[1.20, 1.82]-1.489
Synthetic Control9.4700.168[9.14, 9.80]+6.470
Synthetic DiDclosest3.0820.168[2.75, 3.41]+0.082
True β3.000
10

Donor pool size for synthetic control

20

Total time periods in the panel

3.0

The causal effect of treatment on the treated unit

0.50

How similar the treated unit is to controls pre-treatment (1 = perfect, 0 = very different)

Why the difference?

Standard DiD is biased (-1.49) because it assumes parallel trends and weights all control units equally, ignoring that some controls may be poor comparators for the treated unit. Synthetic DiD combines the strengths of both: it re-weights control units (like SC) AND re-weights pre-treatment time periods (like DiD), producing the most robust estimate (3.08) by adapting to both cross-sectional and temporal heterogeneity.

D. Mathematical 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.

E. Implementation

library(synthdid)

# Prepare data as a matrix: Y is N x T, control units first
# N0 = number of control units, T0 = number of pre-treatment periods

# Step 1: Estimate SDID
tau_sdid <- synthdid_estimate(Y, N0, T0)

# Step 2: Compute standard error via placebo method
# Reassigns treatment to each control unit and computes placebo effects
se_sdid <- sqrt(vcov(tau_sdid, method = "placebo"))
cat("SDID:", tau_sdid, "(SE:", round(se_sdid, 3), ")\n")

# Step 3: Compare with DiD and SC for robustness
# did_estimate uses equal weights (standard DiD)
tau_did <- did_estimate(Y, N0, T0)
# sc_estimate uses synthetic control weights (no intercept shift)
tau_sc <- sc_estimate(Y, N0, T0)
cat("DiD:", tau_did, "\nSC:", tau_sc, "\nSDID:", tau_sdid, "\n")

# Step 4: Plot the SDID estimate with trajectory and weights
plot(tau_sdid)
Requiressynthdiddid

F. Diagnostics

  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.

G. What Can Go Wrong

Assumption Failure Demo

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.

Assumption Failure Demo

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).

Assumption Failure Demo

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.

H. Practice

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?

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.

I. Swap-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.

J. Reviewer Checklist

Critical Reading Checklist


Paper Library

Foundational (5)

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

American Economic ReviewDOI: 10.1257/aer.20190159

This paper introduced 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.

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

The original synthetic control paper, which constructs a weighted combination of control units to approximate the treated unit's counterfactual trajectory. Synthetic DID builds on this by adding a DID-style intercept shift that relaxes the requirement for exact pre-treatment fit.

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 developed heterogeneity-robust DID estimators for staggered adoption settings. Their framework provides the DID foundation that synthetic DID builds upon, and understanding their group-time ATT framework is essential for appreciating how synthetic DID extends standard DID.

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 proposed augmenting the synthetic control estimator with an outcome model to reduce bias from imperfect pre-treatment fit, creating a doubly robust estimator. This augmented approach is closely related to synthetic DID and provides useful theoretical insights.

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

Econometrics JournalDOI: 10.1093/ectj/utad018

Arkhangelsky and Imbens extended the synthetic DID framework by developing doubly robust identification strategies for causal panel data models. Their approach combines outcome modeling with re-weighting, providing consistent estimates if either the outcome model or the weighting scheme is correctly specified, thereby strengthening the theoretical foundations of the SDID approach.

Application (4)

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

Clarke and colleagues developed 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 extended 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.

Dube, A., Girardi, D., Jorda, O., & Taylor, A. M. (2023). A Local Projections Approach to Difference-in-Differences Event Studies.

NBER Working Paper No. 31184DOI: 10.3386/w31184

Dube and colleagues connected local projections to DID event studies and demonstrated how synthetic DID-type weighting can improve estimation of dynamic treatment effects. This paper shows the broader applicability of the synthetic DID idea beyond the original static setting.

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 extended synthetic control and synthetic DID methods to staggered adoption settings where multiple units adopt treatment at different times. They demonstrated 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.

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

This comprehensive survey synthesizes the recent econometrics literature on difference-in-differences, covering staggered treatment timing, heterogeneous treatment effects, pre-trends testing, and modern estimators including synthetic DID. It provides essential context for understanding how SDID relates to the broader landscape of DID methods.

Tags

design-basedpanelfrontier