However, there are a few instances where a person is in the data more than once, connected to different places. In these instances, I am hoping to drop the observation(s) where they have a lower -score- value (and keep all unique observations at the same time). I have been trying different bysort and collapse variations to no avail.
Thank you for your help!
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str5 place byte(person score) "87343" 1 12 "87165" 2 14 "86987" 33 15 "86809" 16 11 "86631" 35 17 "86453" 6 27 "86275" 6 25 "83564" 18 24 "83386" 9 25 "83208" 10 26 "83030" 11 27 "82852" 11 15 "82674" 11 16 "82496" 14 17 "82318" 15 19 "82140" 15 13 "81962" 25 7 "81784" 24 8 "89000" 23 24 "88822" 29 22 end
0 Response to Keeping only higher duplicate value
Post a Comment