I am try to execute the following code
Code:
recode educn (1=0)(2/4=1)(5=3)(6=5)(12=15)(10=12)(8=10)(7=8)(13=17)(11=13), gen(educ)
It executes without error. However, it correctly recodes (1=0)(2/4=1)(5=3)(6=5)(7=8)(8=10) and incorrectly recodes the rest.
i.e., 10 is recoded as 9 instead of 12, 11 as 9 instead of 13, 12 as 13 instead of 15. Can someone help me figure out the reason.

Thanks,