I want to drop the following observations:
If a person has written several articles for one firm in one time period, only the newest one (creat day and creat time closest to report day and report time) should be used.
I have 5 different time periods. Date5 Date4 Date3 Date2 and Date1 are dummyvariables with 1 if the article was written and published within that time period and 0 else.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float reports_date double reports_time float created_date double created_time float(date5 date4 date3 date2 date1) str90 name str37 username 21123 72000000 21123 50411000 0 0 0 0 1 "RenaissanceRe Holdings Ltd." "rama2050" 21123 72000000 21123 16017000 0 0 0 0 1 "RenaissanceRe Holdings Ltd." "NCIA" 20149 75600000 20146 19545000 0 0 0 1 0 "Caesars Entertainment Corporation" "rerobles" 21123 72000000 21123 8104000 0 0 0 0 1 "RenaissanceRe Holdings Ltd." "QuantTrader007" 21123 72000000 21121 19666000 0 0 0 1 0 "RenaissanceRe Holdings Ltd." "QuantTrader007" 21123 72000000 21121 21911000 0 0 0 1 0 "RenaissanceRe Holdings Ltd." "StockTurkey" 21123 72000000 21100 18416000 0 1 0 0 0 "RenaissanceRe Holdings Ltd." "StockTurkey" 20523 75600000 20475 71465000 1 0 0 0 0 "Global Brokerage, Inc." "lupus" 20495 39600000 20493 56357000 0 0 0 1 0 "Peabody Energy Corp." "kevnad66" 20495 39600000 20495 15340000 0 0 0 0 1 "Peabody Energy Corp." "QuantTrader007" end format %td reports_date format %tcHH:mm:ss reports_time format %td created_date format %tcHH:mm:ss created_time
Thanks in advance
Thomas
0 Response to drop observations
Post a Comment