Hi everyone, I have this code (I have simplified it here, but same concept)
gen x_i = 0
replace x_i= 1 if (a> 0.i )
and I need to repeat this 10 times. The actual code is much longer than these two lines.
Basically, "i" takes the following values: 00, 01, 02, 05, 10, 15, 20 etc. I don't know how to use a loop to get this done cause "i" is a string and at the same time, is going to be part of a number in a>0.i
for example: a>0.0 a>0.01 a>0.02 etc
Is this even possible ?
gen x_i = 0
replace x_i= 1 if (a> 0.i )
and I need to repeat this 10 times. The actual code is much longer than these two lines.
Basically, "i" takes the following values: 00, 01, 02, 05, 10, 15, 20 etc. I don't know how to use a loop to get this done cause "i" is a string and at the same time, is going to be part of a number in a>0.i
for example: a>0.0 a>0.01 a>0.02 etc
Is this even possible ?
Comment