I am trying to check if my ID uniquely identifies observations in the data. According to Stata, my id (uid) does not. So I am trying to find duplicate ids by running the code below. As you can see, according to my check variable, these IDs are equal to each other yet they don't appear to be. I am not being able to understand why these are being considered equal IDs.
Code:
sort uid gen check4 = (uid[_n] == uid[_n+1])
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str15 uid float check4 "80180103_249_2" 1 "80180104_249_2" 1 "80105103_291_2" 1 "80105103_285_2" 1 "80180101_308_1" 1 "80105104_229_2" 1 "80105103_197_2" 1 "80105103_102_2" 1 "80180102_282_2" 1 "80180104_189_1" 1 "80105101_129_2" 1 "80180104_162_2" 1 "80180102_185_2" 1 "80180102_144_1" 1 "80105104_183_2" 1 "80180102_181_2" 1 "80180104_144_1" 1 "80180103_261_2" 1 "80180102_229_1" 1 "80105103_319_2" 1 "80105103_230_2" 1 "80105103_289_2" 1 "80180103_181_2" 1 "80180101_261_1" 1 "80180104_230_1" 1 "80105103_129_2" 1 "80180102_207_1" 1 "80180102_291_1" 1 "80180103_191_1" 1 "80180103_311_2" 1 "80180103_282_2" 1 "80180102_282_1" 1 "80105104_222_2" 1 "80180102_144_2" 1 "80180101_140_2" 1 "80180101_291_2" 1 "80105102_329_2" 1 "80180103_159_1" 1 "80180102_269_1" 1 "80105102_179_2" 1 "80180103_140_1" 1 "80180103_279_1" 1 "80105101_288_2" 1 "80105103_189_2" 1 "80180102_185_1" 1 "80180104_159_1" 1 "80105102_162_2" 1 "80105101_230_2" 1 "80180101_222_2" 1 "80180101_309_1" 1 "80105104_144_2" 1 "80180101_159_1" 1 "80180101_229_1" 1 "80105101_261_2" 1 "80180103_181_1" 1 "80180103_222_1" 1 "80105101_190_2" 1 "80180104_282_2" 1 "80180103_230_1" 1 "80180101_289_1" 1 "80180101_190_1" 1 "80180101_286_2" 1 "80180103_309_2" 1 "80180104_169_2" 1 "80180104_320_2" 1 "80105103_309_2" 1 "80180101_144_1" 1 "80180102_179_2" 1 "80105102_190_2" 1 "80180102_102_2" 1 "80105104_249_2" 1 "80105101_300_2" 1 "80180102_308_2" 1 "80180104_170_2" 1 "80105101_229_2" 1 "80105103_296_2" 1 "80105102_269_2" 1 "80180102_189_1" 1 "80180102_189_2" 1 "80180101_229_2" 1 "80105104_261_2" 1 "80180103_207_2" 1 "80105103_279_2" 1 "80105104_217_2" 1 "80180101_319_1" 1 "80105102_319_2" 1 "80180104_191_1" 1 "80105102_208_2" 1 "80180102_190_1" 1 "80180101_191_2" 1 "80105102_169_2" 1 "22237102_279_1" 1 "80180101_189_1" 1 "80180102_229_2" 1 "80180102_289_1" 1 "80180101_230_2" 1 "80180102_179_1" 1 "80180102_286_1" 1 "80105101_269_2" 1 "80180102_329_1" 1 end
0 Response to Equality of two string experessions
Post a Comment