Hi Stata users,
I have a data set with string and numeric variables and would want to check for each unique string value it has a corresponding unique numeric code. In data example I would flag AAA as an error since they have different codes. Below is data example
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str3 string byte numeric
"AAA" 10
"AAA" 11
"BBB" 20
"BBB" 20
"BBB" 20
"CCC" 30
"CCC" 30
end
Thanks in advance!