Dear Statalist Users,
I would like to write this part of code in a cleaner way too, with a loop or any other more professional way. Do you have any suggestion please?
Thank you so much in advance!
Best regards,
--
Michael Duarte Gonçalves
I would like to write this part of code in a cleaner way too, with a loop or any other more professional way. Do you have any suggestion please?
Code:
gen CDI=1 if ansbef_1==2 | ansbef_2==2 | ansbef_3==2 | ansbef_4==2 | ansbef_5==2 | ansbef_6==2 | ansbef_7==2 | ansbef_8==2 | ansbef_9==2 | ansbef_10==2 replace CDI=0 if CDI~=1
Thank you so much in advance!
Best regards,
--
Michael Duarte Gonçalves

Comment