Hello all, I am new to STATA and trying to loop replace function. Is there a way to improve my code?
replace d_20180706 = 25 if d_20180706 == 1
replace d_20191001 = 30 if d_20191001 == 1
replace d_20180823 = 25 if d_20180823 == 1
replace d_20191002 = 30 if d_20191002 == 1
replace d_20180924 = 10 if d_20180924 == 1
replace d_20190601 = 25 if d_20190601 == 1
replace d_20190901 = 15 if d_20190901 == 1
Thanks a lot for the help.