Announcement

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

  • Event Study Plot with DID and Poisson Regression

    Hi all,

    I am doing a DID analysis on a legal dataset where each observation is a court case. Every court case has a date of first hearing and date of the decision, and subtracting these gives me my dependent variable 'Days for Decision'. I have an event (a passing of an Act) around which I am looking at the before/after, and sections of the Penal Code that define the treatment/control groups. I am using a poisson regression for this purpose, using the -ppmlhdfe- command.

    MWE if required:
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float hearing_time1 int(court_id section_no) float(timetotreat filing_m_y)
      97 11 304 -19 620
       1 11 337  30 669
       3 11 326  -5 634
      10 11 376  32 671
     456 11 506 -33 606
       3 11 279  64 703
       2 11 406  41 680
     308 11 379  32 671
       3 11 380  58 697
       1 11 506  65 704
      72 11 506  36 675
     191 11 192  19 658
       1 11 452  29 668
       1 11 307  67 706
       1 11 194 -30 609
       4 11 380  34 673
     293 11 407  23 662
      51 11 323  24 663
       2 11  21  -4 635
      29 11 380  27 666
      14 11 506  45 684
       1 11 194  -9 630
       2 11 399  47 686
       2 11 467  55 694
       2 11 323  47 686
       2 11 420  46 685
      63 11 338  32 671
     148 11 304 -16 623
       3 11 379  34 673
       3 11 302  57 696
       2 11 306  63 702
     343 11 506  -9 630
     717 11 506 -21 618
       1 11 420  62 701
       2 11 302  65 704
       1 11 337  56 695
      15 11 307   5 644
      29 11 420  38 677
      15 11 379   8 647
       1 11 354   4 643
      53 11 279  56 695
      30 11 354  33 672
      15 11  34  68 707
       2 11 409  57 696
       1 11 337  23 662
     121 11 337  11 650
     246 11 324  31 670
      15 11 354  60 699
       2 11 511  38 677
      55 11 506  -9 630
     424 11  25 -33 606
       2 11 397  30 669
      38 11 109  19 658
       2 11 394  39 678
       4 11 219 -14 625
      12 11 380  -7 632
       2 11 406  60 699
     169 11 379 -23 616
       1 11 379  53 692
       4 11  34 -21 618
       3 11 379 -14 625
       9 11 506  31 670
     204 11 506  32 671
      30 11 406  50 689
       4 11 379  59 698
       8 11 401  16 655
       1 11 506  15 654
       1 11 506  68 707
      11 11 307  50 689
       3 11 308  57 696
      25 11 302  22 661
      10 11 302  45 684
       1 11 366  27 666
       1 11 379  67 706
      83 11 304  15 654
       1 11 337  36 675
      87 11 379  28 667
       1 11 506  18 657
      15 11 376  37 676
       5 11 498  62 701
    1022 11 506  -6 633
       2 11 307  40 679
      81 11 467   5 644
      25 11 325  10 649
     272 11 327 -30 609
       1 11 289  64 703
      70 11 506  68 707
       8 11 354   6 645
       1 11 406  45 684
       1 11 337  12 651
       2 11 467  47 686
      21 11 306  19 658
       1 11 409  62 701
       1 11 506  30 669
      29 11 364  -5 634
       1 11 452  23 662
       1 11 506  19 658
      57 11 279 -11 628
       2 11 324  62 701
       8 11 511 -15 624
    end
    format %tm filing_m_y

    I wanted to make Event Study plots for this data, and am not sure how to do that.
    1. I was using the -eventdd- command, but I am not sure if my syntax is correct. I am currently using:
      Code:
      eventdd hearing_time1 i.court_id i.section_no, timevar(timetotreat) ci(rcap) cluster(section_no)
      where hearing_time1 is my dependent variable, court_id and section_no are court and section fixed effects. The data goes from 2010 till 2018, so timetotreat has been created using by subtracting the month-years from the month of the event (which is 2013m4).
    2. Do I need to use the DID coefficient I have created (treatment*post)? Or does the timevar suboption do that already?
    3. Additionally, would I need to incorporate Poisson regression in some way, and if so, how would I do that?
    I think I am confused about what event study actually does, so advice, guidance, or useful references on any or all of the above would be extremely helpful.
Working...
X