Hi All, Please, could anyone help me with coding for an event study. The dataex follows below:
I want to estimate the causal effect of getting ill (ill - dt_notific for date of notification of the illness) on subsequent crime commitment.
Some individuals commit crimes before and/or after getting sick.
My outcomes of interest are:
Many thanks in advance!
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(id ill dt_notific crimedate) str7 crime_type float(crime_dummy crime_count crime_dummy_post crime_count_post age) 1001 0 . . "" 0 0 0 0 16 1002 0 . 20980 "Robbery" 1 2 0 0 16 1002 0 . 21087 "Theft" 1 2 0 0 16 1003 1 20834 20860 "Theft" 1 1 1 1 17 1004 0 . . "" 0 0 0 0 17 1005 1 20929 20855 "Assault" 1 2 1 1 17 1005 1 20929 20940 "Robbery" 1 2 1 1 17 1006 0 . . "" 0 0 0 0 15 1007 0 . 21189 "Fraud" 1 1 0 0 15 1008 1 21094 21063 "Theft" 1 1 0 0 17 1009 0 . . "" 0 0 0 0 16 1010 1 21227 21258 "Drug" 1 1 1 1 15 1011 0 . . "" 0 0 0 0 15 1012 0 . . "" 0 0 0 0 15 1013 0 . . "" 0 0 0 0 16 1014 1 21411 . "" 0 0 1 1 17 1015 0 . 21220 "Theft" 1 1 0 0 18 1016 0 . . "" 0 0 0 0 16 1017 1 21498 21519 "Robbery" 1 2 1 2 16 1017 1 21498 21628 "Fraud" 1 2 1 2 16 1018 0 . . "" 0 0 0 0 15 1019 0 . . "" 0 0 0 0 15 1020 0 . 20888 "Theft" 1 2 0 0 16 1020 0 . 21664 "Assault" 1 2 0 0 16 1021 1 21613 . "" 0 0 1 1 15 1022 0 . . "" 0 0 0 0 18 1023 0 . . "" 0 0 0 0 17 1024 1 21710 . "" 0 0 1 1 18 1025 0 . . "" 0 0 0 0 16 end format %td dt_notific format %td crimedate
Some individuals commit crimes before and/or after getting sick.
My outcomes of interest are:
- crime_dummy_post – indicator for committing any crime after dengue, and
- crime_count_post – number of crimes after dengue.
Many thanks in advance!

Comment