bcallaway11 / did

Difference in Differences with Multiple Periods, website: https://bcallaway11.github.io/did
288 stars 92 forks source link

The same unit treated twice #136

Closed azev77 closed 1 year ago

azev77 commented 2 years ago

Can your package handle cases where the same unit is treated twice?

For example, the same state gets two minimum wage hikes (at different times)

bcallaway11 commented 2 years ago

Not really, or I guess it depends on how you want to do it. You can follow the same “idea” and just define extra groups corresponding to getting a minimum wage change at a certain time period and then another minimum wage change at a different time, but our code will not work off-the-shelf in that case. I think there are some conceptual difficulties in cases like this — for example, when there are multiple possible treatments, you can effectively run into a curse-of-dimensionality due to the number of units per “group” getting small. Besides that, it is not immediately clear if there are general purpose solutions for the aggregation step in this case either (i.e., how one can combine different combinations of treatment regimes into lower-dimensional parameters); to me, it seems likely that the best way to do this would likely depend heavily on the particular application.

Brant

simonschoe commented 1 year ago

@bcallaway11 Hi Brant, sorry for reopening, but I am currently dealing with the exact same issue. In my application, I am looking at firms that experience the same type of event potentially multiple times. Say for a example an acquisition: a firm is acquired first in 2005 and then a second time in 2012. Could you give any guidance on how to best implement such a setting within the context of your package? Particulary, I am struggling with how to set up gname in a meaningful way. Your help is much appreciated!