Daniel-Pailanir / sdid

Synthetic Difference in Differences for Stata
GNU General Public License v3.0
72 stars 36 forks source link

Underlying data for graphs #32

Closed georgewzuo closed 2 years ago

georgewzuo commented 2 years ago

Is it currently possible to view the underlying data for the graphs? For example, I'd like to calculate the difference in point estimates between treatment and control for each pre-treatment period (to assess goodness of fit) and each post-treatment period (to assess the magnitude of the effect). Thanks!

Daniel-Pailanir commented 2 years ago

Hello! I updated the sdid command a few minutes ago and now it is possible to access the control and treatment series of the graph. Reinstall the sdid command from github (net install sdid, from("https://raw.githubusercontent.com/daniel-pailanir/sdid/master") replace) and you should be able to see the data using for example matlist e(series).

You should know that to keep the series in memory it is necessary to add the graph option in the command.

For example:

webuse set www.damianclarke.net/stata/
webuse prop99_example.dta, clear
sdid packspercapita state year treated, vce(placebo) seed(1213) graph
matlist e(series)

I hope it helps you!

georgewzuo commented 2 years ago

Amazing - thanks so much for the quick response!