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

did_multiplegt_dyn continuous variable #45

Closed mblancoschroeder closed 2 weeks ago

mblancoschroeder commented 3 weeks ago

Hello,

I have a question regarding a continuous treatment variable. The treatment variable is defined as the number of available places per kid in each region and year. I considered two alternatives estimations where I changed the way I consider the treatment variable:

a. I transform the treatment variable into quantiles (and also specify the option continuous) b. I consider the treatment variable but I round it to 1 decimal (if the treatment variable takes the value of 0.234, I consider it as 0.2) (and also specify the option continuous)

This is what this 2 alternatives look like: a. did_multiplegt_dyn income_up residence4 year4 treat_quantile, continuous(1) controls(year age dpto) effects(8) cluster(residence4) placebo(5) b. did_multiplegt_dyn income_up residence4 year4 places_4_hb_1dec, continuous(1) controls(year age dpto) effects(8) cluster(residence4) placebo(5)

I have two questions.

  1. Why do I have to specify that is continuous in the a. alternative? (If I don’t do this the command doesn’t run, the error message is: insufficient observations)
  2. Why do I obtain such a different "Average total effect per treatment unit”?. In the a. alternative the effect is 1400, while in the b. option is 13.210 (ten times bigger).

Thank you for your help.

Best regards,

Magdalena

chaisemartinPackages commented 2 weeks ago

Hi Madgalena, This is Diego from Clément de Chaisemartin's RA Team. Thanks for your interest in did_multiplegt_dyn! Regarding the need for the continuous option, the estimators from de Chaisemartin and D'Haultfoeuille (2024) compare groups that change their treatment to groups that do not change their treatment and that have the same baseline treatment. As a result, every comparison performed by the program is held between groups that, at T = 1, have the same value of D. This works flawlessly if the support of your treatment does not have too many values. If your treatment is instead truly continuous, as it is in your case, the initial values of the treatment will be almost surely different. As a result, you cannot find two groups that have the same status quo treatment (hence, the insufficient observations message). To solve this issue, the continuous option allows for a different way to retrieve the counterfactual outcome. Specifically, the outcome evolution under the baseline treatment is assumed to be a polynomial of their period one treatment. You can read more about the implementation of this option in Section 2.5 of the companion paper. As for the difference in magnitude, I think that depends on the specifics of your data. Specifically, for the treat_quantile, do you recover the empirical CDF? Or it is the actual discrete quantile bin (1, 2, ...) where the original treatment falls? This matters since the average treatment effects per treatment unit is normalized by the underlying change in treatment, hence I would expect the numerator of the estimator to be similar across the two models, while the denominator should be very different. I hope this helps! Best, Diego

mblancoschroeder commented 2 weeks ago

Dear Diego,

Thank you very much for your message! It's been super helpful.

  1. Re: specifying the continuous option: I understand that if the treatment variable is continuous I need to declare it as continuous so that the command can group similar values and have similar period-one enough comparable observations. But, in my case I have constructed the treat_quantile variable, which takes the value of 1, 2, .. 5. I don't see why I have to use the continuous option, once I have already make it discrete the treatment variable.

  2. Re: the magnitude of the effect. I'm not sure how to compute the denominator in each case. In the case of considering the treatment as treat_quantile, how do I compute the change in treatment ? (I am not recovering the empirical CDF, I'm just taking the discrete quantile bin). In the second case, should I look at the average change in the treatment per unit during the whole period?

Thank you very much for your help !

Best,

Magdalena

chaisemartinPackages commented 2 weeks ago

Dear Magdalena, As for point 1, with treat_quantile defined using the discrete quantile bin, you don't have a problem of matching units based on period 1 treatment, since the treatment can take up to $n$ values for $n$ quantile bins. So, you should not use the continuous option here since your period 1 treatment is not truly continuous with this setting. However, bear in mind that the interpretation of the effect changes, since switchers will be units that move from one quantile bin to the other. To this end, you could have units that effectively change their treatment dose, but both values of the original treatment fall in the same quantile bin, hence you end up considering such unit as a stayer even though its treatment actually changed. As for point 2, the denominator is computed inside the program and you don't have to compute it. If you want to have a better look at the formula for the normalized estimator (and at its interpretation) you could browse Section 3.2 of de Chaisemartin and D'Haultfoeuille (2024). I hope this helps! Best, Diego

mblancoschroeder commented 2 weeks ago

Dear Diego, Thank you very much for your comments, very helpful!

Best regards,

Magdalena