Hi,
I have a dataset with ids that look like: AT18679U (two strings followed by
5 numbers, optionally followed by another string)
Between the two datasets I would like to merge only the first 7 digits are
equal, therefore I generated
generate id7temp=substr(id,1,7)
encode id7temp, gen(id7)
sort id7
and merged the two datasets by id7. When I quality checked the results there
were several mismatches, which don't seem to happen if I use the string id
and not the encoded one. Why is that?
Thanks in advance
-Tom
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/