Announcement

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

  • Staggered dif in dif

    Hello Statalists!

    I am having troubles in dealing with staggered dif in dif

    I am trying to evaluate the impact on scholar segregation of a law that was passed in Argentina during the 90s.
    Although this law was sanctioned in 1993, it was agreed among provinces and the central state to place the implementation between 1996 and 2000.

    - Among 24 provinces, there are 22 that placed the implementation in different years and 2 that never implemented it.
    - also, among the 22 provinces that implemented it, 9 decided to implement the reform gradually, with pilot experiments in few schools, and, at the year 1999 only 4 of them reached the total implementation, while 5 are still in the pilot phase.

    I have a stratified sample of panel data from 1994 to 1999 of all years but 1998 (so 95 96 97 99)

    I always used "normal" dif in dif where the timing was the same for everybody and the treatment was the same for everybody.

    So now I am struggling on whether to code these 2 additional "difficulties" in a regression with fixed effect, because

    1) if I consider all the 22 provinces as treated and only 2 as control, if I run

    xtreg: outcome t##post_treat, fe cluster(school)

    where t=0 for all non treated provinces and 1 for all the treated
    post_treat=year-yearofimplementation

    I have 0 for all the interactions

    2) if I consider the 5 that are still in pilot phase as de facto not treated, I have some values for the interaction, although I am not sure it is the right way to consider them, given that I should be able to run the dif in dif also including them in the treatment group.

    I read in other posts that I have somehow to "pair" them but it is still not clear in my mind how I can do so

    Thank you in advance for all the answers!

  • #2
    Actually, I think the simplest way to handle the staggered implementation is with generalized DID. You can read about it in https://www.ipr.northwestern.edu/wor.../Day%204.2.pdf. The code would look like this:

    Code:
    xtreg outcome i.year t#post_treat, fe vce(cluster school) // NOTE #, not ##
    As for the best way to handle partial implementation, that is a modeling issue that you have to resolve based on your understanding of the underlying science. Among the possibilities are to have a three level treatment variable, 0 = untreated, 1 = partial implementation, 2 = fully implemented. Another approach is to actually make treatment a continuous variable ranging from 0 to 1, the value representing the "fraction" of implementation attained at a given time. There are other possibilities as well, but those are the simplest to model.

    Make sure that your variables t and post_treat are correctly set up for generalized DID. t should be 1 in all observations of a school that is eventually treated, even those before treatment begins, and 0 in all observations of a school that is never treated. post_treat should be 1 in those observations of a school that are after that school implemented treatment, and 0 in those observations that precede implementation. This implies that post_treat is zero for all observations of any untreated school.

    Comment


    • #3
      Thank you very much Clyde! At the end I used your code and created a dummy for my sample that was already the interaction between time and post treat!

      Comment

      Working...
      X