Title

sdid_event -- Synthetic Difference-in-Differences (SDID) event-study estimators.

Syntax

sdid_event Y G T D [if] [in]
[,
effects(integer 0)
placebo(integer 0)
covariates(string)
disag
vce(string)
brep(integer 50)
method(string)]

Y is the outcome variable.

G is the unit/group variable.

T is the time variable.

D is the treatment variable.

Description

sdid_event computes the event-study version of
the Synthetic Difference-in-Differences (SDID) estimators from
Arkhangelsky et al. (2021). As the name suggests, this program
is an extension of sdid. As a result, all the conventions
and requirement for the implementation of sdid also apply
for sdid_event. sdid_event can also be used in
staggered adoption designs, with differential timing of
treatment adoption. Also, the command supports both the
bootstrap and placebo vce() options for inference.

The derivation of the estimators computed by sdid_event
can be found in the companion paper.
The user can also request cohort-specific aggregated
and event study estimates via the disag option.
As in sdid, the dataset has to be a balanced panel
and D has to be a binary and absorbing treatment,
meaning that the treated units cannot revert their treatment status.

This package depends on sdid and unique,
which can be both installed from SSC.

Options

effects(): number of event study effects to be reported.
By default, all feasible dynamic effects are reported.

placebo(): number of placebo estimates to be computed.
placebo(all) returns all feasible placebo estimates.

disag: reports estimates of the cohort-specific aggregated and event study estimators.

vce(): selects method for bootstrap inference.
The allowed arguments are off, bootstrap and placebo.
With off, the program reports only the point estimates,
while bootstrap and placebo correspond to
Algorithms 2 and 4 in Clarke et al. (2023).

covariates(): adds covariates to the estimation routine.
To this end, sdid_event implements the projected method
from sdid, whereas the outcome is replaced by the residuals
of the outcome variable from a TWFE regression on covariates, in the
sample of untreated and not-yet-treated units.

brep(): number of bootstrap replications (default = 50).

method(): estimation method. Allowed arguments:
sdid (default) for Synthetic DiD, did for
traditional DiD and sc for Synthetic Control.

Examples

Example 1: Random DGP

clear

local GG = 19

local TT = 20

set seed 0

set obs `=`GG' * `TT''

gen G = mod(_n-1,`GG') + 1

gen T = floor((_n-1)/`GG') + 1

gen D = T > mod(G, 4) + 1 & G >= `GG'/4

gen Y = uniform() * (1 + D + 10*D*T)

sdid_event Y G T D

Example 2: Bhalotra, Clarke, Gomes
& Venkataramani (2023) from Section 4.4
of Clarke et al. (2023)

webuse set www.damianclarke.net/stata/

webuse quota_example.dta, clear

keep if quotaYear==2002 | quotaYear==.

sdid_event womparl country year quota, vce(placebo) brep(50) placebo(all)

mat res = e(H)[2..27,1..5]

svmat res

gen id = _n - 1 if !missing(res1)

replace id = 14 - _n if _n > 14 & !missing(res1)

sort id

twoway (rarea res3 res4 id, lc(gs10) fc(gs11%50)) (scatter res1 id, mc(blue) ms(d)), legend(off) title(sdid_event) xtitle(Relative time to treatment change) ytitle(Women in Parliament) yline(0, lc(red) lp(-)) xline(0, lc(black) lp(solid))

Saved results

e(H): matrix with console output.

e(H_c): matrix with disag option output.

e(b) and e(V): conventional point estimate vector and variance matrix to allow for integration with estout.

References

Arkhangelsky, D., Athey, S., Hirshberg, D., Imbens, G., Wager, S. (2019) Synthetic difference in differences.

Ciccia, D. (2024) A Short Note on Event-Study Synthetic Difference-in-Differences Estimators.

Clarke, D. Pailanir, D. Athey, S., Imbens, G. (2023) Synthetic difference in differences estimation.

Authors

Diego Ciccia, Sciences Po.
diego.ciccia@sciencespo.fr

Damian Clarke, Universidad de Chile.
dclarke@fen.uchile.cl

Daniel Pailañir, Universidad de Chile.
dpailanir@fen.uchile.cl