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.
Related Posts with Looping replace function
How to generate predicted wage (gap) with margins command and plot a profile with marginsplotDear Stata user, I would like to have predicted mean immigrant-native wage gaps on the vertical axi…
coefplot chang bar color?My question is how can I change the bar colors when I`m using HTML Code: coefplot I added this HTM…
Interpreting Xtabond2 Coefficients & Coefficient Inflation?Hi, This is a follow-up question for this topic, but because the question is different, I thought m…
Coefplot: reduce spacing on y-axisHello everybody, I have a question about how to reduce the spacing between labels on the y-axis whe…
Getting an error from putexcel set ..., openI have this simple line of code to setup my excel worksheet but I get the following error when I try…
Subscribe to:
Post Comments (Atom)
0 Response to Looping replace function
Post a Comment