Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • TWFE with dynamic/heterogenous effects and a continuous treatment

    I am running a staggered TWFE with dynamic/heterogenous effects and a continuous treatment. My code is as follows:
    did_multiplegt y_U_E Region_T_P_S survey_year Treatment_hat, controls(age education) breps(10) cluster (Region_T_P_S) placebo(5) dynamic(5) robust_dynamic average_effect

    I have cross section data from 2005 to 2014 and I m interesting on the impact of employment policies witch is a continue variable on Y also continues variable .
    The policy was implemented in 2010 .

    I would like to estimate DID model through tow fixed effects : year and region
    y_O_E : output

    Region_T_P_S : region fixed effect

    survey_year : year fixed effect .

    Treatment_hat : treatment variable witch is continues
    However I get this error message :
    The command was not able to estimate the treatment effect at the period when groups' treatment change.

    If your treatment is continuous or takes a large number of values, you may need to use the threshold_stable_treatment option to ensure you have groups whose treatment does not changeover time. You may also need to use the recat_treatment option to discretize your treatment variable.

    even when I used the threshold_stable_treatment option I get the same error
    Thanks for any suggestions .
    Ali
    Last edited by Ali Souag; 23 Aug 2022, 16:37.

  • #2
    How did you go about recategorising the treatment? De Chaisemartin and D´Haultefoueille (2020) explain how to di it in detail in their paper introducing this command.

    Other than that, waiting on a better answer, is it possible for your treatment to affect education, which you have included as a control?

    And finally, you may want to check out the community contributed command jwdid as an alternative, which implements TWFE DiD as in Wooldridge (2021) and accommodates staggered interventions.

    Comment

    Working...
    X