Hi everyone,
I have problem with Encode command. My dataset includes 2 variables in string type (reachange2 and reachange3). These vars comprise numeric and text. However, when I use encode command, the numeric data of 'reachange3' var turns to a different number. I also post the example in the .doc file: The numeric '4' of 'reachange3' turns to number '3' of 'lydochange3' after using Encode. (After using encode, 2 new vars are generated respectively 'lydochange2 and lydochange3'.
command: encode reachange3, gen(lydochange3)
province distric commune hoso reachange2 reachange3 lydochange2 lydochange3
38 388 15046 107
38 388 15046 107
38 388 15046 107 4 4 4 4
38 388 15046 107 4 4
38 388 15046 107 4 4 4 3
Please help detect where is the error and how can resolve it. I really appreciate that. Thank you a lot.
ps: Nick: May I tag you here, sorry if any inconvenience cause you

Regards
Linh