sdid

Table of contents

  1. Notes
  2. Installation
  3. Test the command

Notes

Installation

ssc install sdid, replace

Take a look at the help file:

help sdid

Test the command

Please make sure that you generate the data using the script given here

sdid Y id t D, vce(bootstrap) seed(1000) 

Since we are using bootstrapped standard errors, we fix the seed for replicability. We get this output:

Bootstrap replications (50). This may take some time.
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
..................................................     50


Synthetic Difference-in-Differences Estimator

-----------------------------------------------------------------------------
           Y |     ATT     Std. Err.     t      P>|t|    [95% Conf. Interval]
-------------+---------------------------------------------------------------
           D | 131.07490    8.42889    15.55    0.000   114.55458   147.59522
-----------------------------------------------------------------------------
95% CIs and p-values are based on Large-Sample approximations.
Refer to Arkhangelsky et al., (2020) for theoretical derivations.

The command’s built-in graph option gives us:

sdid Y id year D, vce(bootstrap) seed(1000) graph

The command saves a set of graphs with prefix g2_ that represent synthetic DiD graphs split by the year of the first treatment:

The weights used to average pre-treatment periods are shown as area fills at the bottom of the figures.