Please advise how I can create a loop for the following 3 similar syntax


gen ethos_1rough90=0
replace ethos_1rough90=1 if ethos_1rough==1 & episode90==1

gen ethos_2emerg90=0
replace ethos_2emerg90=1 if ethos_2emerg==1 & episode90==1

gen ethos_3temp90=0
replace ethos_3temp90=1 if ethos_3temp==1 & episode90==1