Announcement

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

  • Staggered DID analyses

    Hello all,

    I need to conduct two analyses and in both cases a staggered DID seems the most appropriate approach. I'd like to get you opinion about which package(s) would be the best to conduct the analyses.

    In one case, I have repeated cross-sectional data at the lawsuit level. The time period of analysis is quarters; hence, there could several lawsuits by plaintiffs in each quarter. I have data from 3 states, all of which passed a similar law that could affect the outcomes at different points in time. I can identify two groups of plaintiffs: one affected by the law and one not affected (control group).

    The second case involves individual level panel data. Also quarterly observed. Here, I have data from 50 states, about half of them passed a law and the rest had no meaningful change (control group). The treatment also happened at different points in time.

    I have seen other post mentioning different packages to do staggered DID (eg. https://www.statalist.org/forums/for...63#post1741963). I've been trying to run the analysis for the first case using csdid and staggered, but I've been unsuccessful.

    Can someone with experience with the approach recommend the best package(s) to conduct both analyses?

    Thank you,

    Luis

  • #2
    might try Munlak. Wooldridge has transformed the mystery of staggered did into regression.

    csdid would likely work, and I suspect your issue is with setting up the treatment period variable.

    Comment


    • #3
      How about -xtevent- ?

      JMSLab/xtevent: Stata package -xtevent- (github.com)

      Jorge Eduardo Pérez Pérez
      www.jorgeperezperez.com

      Comment


      • #4
        For etwfe try jwdid. It does come with a new option that does not require you to construct gvar only the post-treatment dummy

        Comment


        • #5
          Thank you everyone for your responses.

          I think the problem with the implementation of both csdid and staggered is the ivar setup. For the first analysis, each observation corresponds to a lawsuit, which is unique. The treatment is determined by the type of plaintiff filing the lawsuit (2 groups, only one treated). Each plaintiff files several suits in each time period (quarter). I have have data from 3 states, two states share the same treatment date; hence, I have only two different treatment dates. Since plaintiff name is the unit that is repeating over time, I'm using it as ivar:

          csdid outcome, ivar(plaintiff) time(quarter) gvar(first_treat)

          where first_treat is zero for the control group and equal to quarter that treatment began in each state for the treated group.

          When I run that command I get the following error: repeated time values within panel. What am I doing wrong here?

          Comment


          • #6
            in an xt setting, you can't have duplicate time periods per cross section. you have the plaintiff appearing more than once in a quarter. not thinking it through (your job), you may be able to avert the problem by setting the id as the combo (platintiff , lawsuit) using egen group.

            this is pooled data, not a panel. treating it as a panel is going to give you fits.

            Comment

            Working...
            X