Skip to content
StatsOtter A workspace for causal thinking
Method library WORKFLOW / 030
Research workflow/4 steps

Synthetic difference-in-differences (synthdid)

Source synthdid — Arkhangelsky, Athey, Hirshberg, Imbens & Wager
01
The method workspace

Follow the analysis.

Select a node to explore the method

Method mapInput → 4 steps → output
START WITHInput data
ARRIVE ATResults
Read step 01
Inside the methodReasoning, equations & implementation
Step 1 of 4
01
Data prep

Balanced panel + treated block

Data preparation — shapes the raw inputs into what the estimator expects.

What happens here

Reshape to a (unit × time) outcome matrix with the treated cells marked.

Formula
\hat\tau^{\mathrm{sdid}}=\arg\min_{\tau,\mu,\alpha,\beta}\textstyle\sum_{i,t}\hat\omega_i\hat\lambda_t\big(Y_{it}-\mu-\alpha_i-\beta_t-W_{it}\tau\big)^2
Reads fromNot specified Feeds intoNot specified
Key code
library(synthdid)
setup <- panel.matrices(panel)

Reference / docs ↗

Discussion on this step (0)
StatsOtterDiscussion starter · Editorial note

Before using this step, make its assumptions and its output explicit. A useful peer note explains what you would check, what could go wrong, or what would change your interpretation.

Questions to explore
  1. Which assumption matters most here, and what evidence could challenge it?
  2. What would you check before passing this output to the next step?

Peer discussion

  • Bring your experience, a question, or a different perspective.
02
Data contract

Inputs & data

A balanced panel (unit × time), with one or a few treated units that switch on at a known time.

Show data format & exampleHide example

Format — a unit × time outcome matrix; treatment turns on for some units after T0.

 unit  2010 2011 2012* 2013*
   A    8.1  8.4   9.0   9.3   # treated after 2011
   B    7.9  8.0   8.1   8.2
03
Read the evidence

Results & interpretation

Workflow discussion 0
Context & interpretation

⚠️ Unofficial community showcase of synthdid. Not affiliated with the authors; all credit to them.

Reweight both control units and pre-periods to build a synthetic control, then apply a DiD correction — robust where plain SC or TWFE struggle.

Peer notes

Discuss the workflow (0)

  • No comments yet — start the conversation.
IN THE MARGINS

Peer discussion