Dear Statalist Users,
I am trying to create a loop with all this code, but I was wondering if there was a simpler method, with a loop in particular. Here is my rudimentary code:
A big thank you for the one who answers me. I've been struggling with this for a while!
Best Regards,
--
Michael Duarte Gonçalves
I am trying to create a loop with all this code, but I was wondering if there was a simpler method, with a loop in particular. Here is my rudimentary code:
Code:
replace ansbef_1=. if ansbef_1==-9 | ansbef_1==-1 replace ansbef_2=. if ansbef_2==-9 | ansbef_2==-1 replace ansbef_3=. if ansbef_3==-9 | ansbef_3==-1 replace ansbef_4=. if ansbef_4==-9 | ansbef_4==-1 replace ansbef_5=. if ansbef_5==-9 | ansbef_5==-1 replace ansbef_6=. if ansbef_6==-9 | ansbef_6==-1 replace ansbef_7=. if ansbef_7==-9 | ansbef_7==-1 replace ansbef_8=. if ansbef_8==-9 | ansbef_8==-1 replace ansbef_9=. if ansbef_9==-9 | ansbef_9==-1 replace ansbef_10=. if ansbef_10==-9 | ansbef_10==-1
A big thank you for the one who answers me. I've been struggling with this for a while!
Best Regards,
--
Michael Duarte Gonçalves

Comment