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
Average Net Migration RateHi all. Good Morning. This is my first post here, but I have been consulting you, thank you for your…
composing two different summary statistics tables with one dataset.Hello again, I'm working on a project on which I have to analyse VC-backed ICOs with non-VC-backed …
Bar Graph - Highlight Specific BarArray I have generated the above graph using the following code : Code: graph bar, over(region) bl…
Marginsplot, legend and by()Dear Stata Users, I am producing a graph with marginsplot throug the following commands and options…
Generating row identifiers for nested panelsI am using Stata 15.1. I have nested panel in my data. I am struggling to generate panel row ids. Be…
Subscribe to:
Post Comments (Atom)
0 Response to Looping replace function
Post a Comment