Hi, I have encountered a problem that I do not understand. Somehow, Stata is tagging duplicates that, at first sight, are not duplicates. I have used the following command:
As can be seen in the following sample, it tags these observations while they have different dates (same cusip):
Why could this be the case?
Thanks.
Code:
duplicates tag month year cusip, gen(flag)
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long reprisk_id float(month year) str6 cusip byte flag 101829 9 2015 "466112" 1 101829 1 2019 "466112" 1 101829 12 2020 "466112" 1 101829 8 2019 "466112" 1 101829 9 2019 "466112" 1 101829 2 2020 "466112" 1 101829 12 2019 "466112" 1 101829 4 2018 "466112" 1 101829 3 2018 "466112" 1 101829 11 2019 "466112" 1 end
Thanks.
Comment