Hi I am trying to make a loop inside another loop but it does not work. What's wrong with my code?
Saleh
Code:
foreach var of varlist stock_implants stock_iud stock_sayana_press stock_depo_provera stock_pills stock_male_condoms stock_female_condoms stock_ec stock_diaphragm stock_foam stock_beads stock_injectable { gen no_`var'=1 if `var'>1 & `var'<. foreach x of varlist no_`var'{ recode no_`var' (.=0) if fp_offered=1 } }
Comment