Announcement

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

  • DID evenstudyinteract with sub group analysis

    I am trying to create this event study graph in stata

    I was able to generate the table. Here is my code and the table. My main problem is generating the plot. both qct and nonqct should have one pretrend; then separate post treatment as shown in the graph. So i need help in generating a plot similar to this image


    Click image for larger version

Name:	eventstudyplot.png
Views:	1
Size:	34.3 KB
ID:	1781903



    Here is my code and the regression table


    eventstudyinteract poverty_rate k_5 k_4 k_3 k_2 ///
    g0_qct1 g0_nonqct1 g1_qct1 g1_nonqct1 g2_qct1 g2_nonqct1 g3_qct1 g3_nonqct1 ///
    if ((treat_new_qct == 1 | treat_non_qct == 1) & time_til >= -5 & time_til <= 3 & ///
    first_treat <= 2019 & first_treat >= 2015) | control == 1, ///
    cohort(first_treat) control_cohort(control) absorb(i.tract i.year) vce(cluster tract)


    Click image for larger version

Name:	table.png
Views:	1
Size:	391.5 KB
ID:	1781904
Working...
X