chaisemartinPackages / did_multiplegt_dyn

|| Stata | R || Estimation of event-study Difference-in-Difference (DID) estimators in designs with multiple groups and periods, and with a potentially non-binary treatment that may increase or decrease multiple times.
23 stars 6 forks source link

baseline period #17

Closed kikiwong333 closed 2 months ago

kikiwong333 commented 2 months ago

I tried the command you provided in Stata, but I found that it takes period 0 as the baseline period. How can I change it to take period -1 as the baseline period? Thank you so much!

chaisemartinPackages commented 2 months ago

To avoid misunderstanding let me try to clairify what period 0 referes to in the context of the estimation performed by did_multiplegt_dyn. For each group g we define F_g, the period at which this group changes their treatment for the first time. Lets say for example you have data with 10 periods and group g changes their treatment (for the first time) in period 4 then F_g=4, the first period in which group g experienced the different treatment. As the baseline period we always take the period F_g-1, which is the last period before group g changed its treatment. Then, the estimator compares the outcome evolution of groups that changed their treatment at F_g to those groups with the same status quo treatment at F_g-1 that did not change their treatment by taking the difference of the long differences between those groups from period F_g-1 to period F_g-1+\ell (where \ell is the number of dynamic effects you specify in the effects option). To frame it in the example, if you would want to estimate the effect of reciving some psitive treatment after 3 periods (\ell=3), the estimator would compare the outcome evolution from period 3 to period 6 (3 treated periods 4,5,6) between groups with the same status quo treatment level that changed their treatment for the first time in period 4 and groups that did not (yet) change their treatment in period 6. In that sense, I think the fact that the baseline period we use is F_g-1 is what you describe as using period -1 as the baseline period and that there is just a bit of confusion with the notation of the effects (Effect_1 is the instatanious effect at F_g, Effect_2 at F_g+1 and so on, but the baseline period is still the period before the treatment cahnges for the first time). I hope that answers your question and in cse it does not feel free to come back to us!

Best, Felix

kikiwong333 commented 2 months ago

Your mean that "effect1" reported in the results corresponds to what I understand as the time when the treatment group was first treated. Thank you!

kikiwong333 commented 2 months ago

did_multiplegt The first picture from did_multiplegt. t=-1 (from last period before treatment changes to t). did_multiplegt_dyn The second picture from did_multiplegt_dyn. t=0 (from last period before treatment changes to t). You mean t=-1 and t=0 are the same in the two pictures. Just labeled differently.

chaisemartinPackages commented 2 months ago

Yes, that is exactly it, just a different label for the same effects. What is effect_0 in did_multiplegt is effect_1 in did_multiplegt_dyn, effect_1 is effect_2, and so on, always shifted by one period. So in the end this is as if the baseline period is noted as -1 in did_multiplegt and as 0 in did_multiplegt_dyn, however when you think about the notation with F_g they both refer to the same period which is F_g-1, the period directly before the treatment change happens.

Best, Felix

kikiwong333 commented 2 months ago

Thank you so much! Qi