Hi,
I would like to check if observations (the values of snl_institution_key, the first column in the example below) appear as observations in other variables (the subsequent columns below). In Excel it would done with vlookups, not sure how to to do it in Stata though. How would I go about doing this? Thanks!
I would like to check if observations (the values of snl_institution_key, the first column in the example below) appear as observations in other variables (the subsequent columns below). In Excel it would done with vlookups, not sure how to to do it in Stata though. How would I go about doing this? Thanks!
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long snl_institution_key float(matchdir1_snl_institution_key matchdir2_snl_institution_key matchdir3_snl_institution_key matchdir4_snl_institution_key) 4144711 . . . . 4253984 . . . . 4145025 . . . . 4263041 . . . . 4253960 . . . . 4253961 . . . . 4253380 . . . . 4253986 . . . . 4263265 . . . . 4185986 . . . . 4253962 . . . . 113830 4085960 3002056 4571062 4198738 4429684 . . . . 4253973 . . . . 4263263 . . . . 4155878 . . . . 4145330 . . . . 4253904 . . . . 4263273 . . . . 4253979 . . . . 4253903 . . . . 4182942 . . . . 4253966 . . . . 4253963 . . . . 4253968 . . . . 113985 4044461 4242195 4242165 4145330 4621655 . . . . 4401733 . . . . 4140555 . . . . 4112994 . . . . 4156487 . . . . 4198738 . . . . 4259070 . . . . 4155881 . . . . 4403760 . . . . 4400794 . . . . 4253844 . . . . 4394314 . . . . 4263318 . . . . 4155880 . . . . 4210296 . . . . 4145332 . . . . 4219330 . . . . 4328959 . . . . 4253323 . . . . 4242263 . . . . 4621874 . . . . 4622044 . . . . 4621393 . . . . 4621855 . . . . 4621791 . . . . 4621517 . . . . 4538595 . . . . 4559164 . . . . 4263351 . . . . 4253679 . . . . 4620983 . . . . 4576215 . . . . 4621452 . . . . 4621431 . . . . 4620401 . . . . 4402001 . . . . 4620989 . . . . 4144343 . . . . 4622086 . . . . 4262988 . . . . 4253631 . . . . 4187359 . . . . 4622084 . . . . 4620797 . . . . 4620305 . . . . 4621461 . . . . 4621644 . . . . 4619674 . . . . 4620986 . . . . 4263176 . . . . 4620385 . . . . 4407379 . . . . 4213238 . . . . 4622043 . . . . 4577844 . . . . 4620368 . . . . 4547981 . . . . 4620765 . . . . 4622081 . . . . 4263247 . . . . 4621465 . . . . 4138555 . . . . 4620314 . . . . 4155882 . . . . 4089743 4155878 4144343 4145025 4145113 4263902 . . . . 4387081 . . . . 4242197 . . . . 4253340 . . . . 4145042 4112994 4139624 4141303 4144343 4328940 . . . . 4402747 . . . . 4628094 . . . . 4621615 . . . . end
Comment