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
Linear regression on a string of ranges of indep varHi all, I am trying to split the independent variable into different ranges and then regress the de…
Statistical Significance between pooled sensitivities of two testsGood evening! I am trying to do a meta analysis of two diagnostic tests, using MIDAS command. I hav…
generate treated_start dateHi, I intend to do a time-varying diffindiff analysis, and I am a bit confused about how to generate…
mismatch r(109) : finding average variablegood evening I hope that you are all in good health. The dataset comprises of a balanced panel of …
Can -mlogit- accommodate repeated choice tasksDear all, I was wondering whether Stata's Multinomial logistic regression can accommodate the presen…
Subscribe to:
Post Comments (Atom)
0 Response to Looping replace function
Post a Comment