I am trying to merge, but every time I run it using the same do.file I get different results for the matched observations.
Code:
merge 1:1 permno event event_count using "04. Cleanfiles\04A. Eventus_CARs_clean.dta"
Basically, this is the code for event_count
Code:
bysort permno event: gen event_count = _n
Code:
* Example generated by -dataex-. For more info, type help dataex clear input double permno float(event event_count) 12236 17356 1 12308 19396 1 12308 20178 1 12308 20234 1 12330 18638 1 12330 19758 1 12431 14304 1 12431 14522 1 12431 14522 2 12431 14742 1 12431 17517 1 12448 19299 1 12449 19947 1 12477 19152 1 12490 13921 1 12490 14437 1 end format %d event
This is the first time I get inconsistent results from the merge command, and I am not sure how to troubleshoot it.
I am using Stata 16.1
0 Response to Question on merge results not consistent
Post a Comment