Dear All, I have two datasets that I want to merge to construct an event study, but I am not sure if I should use TSFILL in this case.I first need to count number of times the individual committed crime in a month. Then, merge both data sets. But as I don't have a proper panel in either data sets, I am not sure if I can use TSFILL or anything else.Do you have any suggestions?
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float var1 str10 date_ill float ill 1 "" 0 1 "05/06/2019" 1 1 "" 0 2 "" 0 3 "25/12/2020" 1 3 "18/02/2021" 1 4 "07/09/2018" 1 4 "" 0 4 "" 0 5 "" 0 5 "" 0 5 "" 0 6 "" 0 6 "20/10/2021" 1 7 "" 0 8 "" 0 9 "11/06/2018" 1 10 "" 0 end
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float id str9 crimedate float(month day year) 1 "02Jan2018" 1 2 2018 2 "15Feb2018" 2 15 2018 3 "17Aug2019" 8 17 2019 4 "22Feb2018" 2 22 2018 4 "25Feb2018" 2 25 2018 5 "13Mar2021" 3 13 2021 5 "25Mar2021" 3 25 2021 5 "10Jul2022" 7 10 2022 6 "12Feb2018" 2 12 2018 7 "11Jan2019" 1 11 2019 end

Comment