Dear statalist,
Can anyone spot the mistake with the following snippet of code.
It actually works fine, and recodes and labels the variable
in the way I wish, but in exiting (?) the loops it runs into problems.
Any advice would be most appreciated.
I believe what is happening is that ajbmspay gets recoded 6 times, creating
new variables a_pay, a_security, etc. These 6 vars all have identical
values. The outer loop then moves on to ajbmswrk, and tries to recode it
into a_pay. Because a_pay already exists, you get an error message. In
short, the new vars may have the labels you want, but they don't have the
values; all 6 are just recodes of ajbmspay.