Hi Everyone,
I would like to use a loop for the following code:
I used this code:
But it did not give me the same results as before. How should I adjust the code?
I would like to use a loop for the following code:
Code:
gen var1=1 if x == y1 | x == y2 | x == y3| x == y4| x == y5| x == y6| x == y7| x == y8 | x == y9 | x == y10 | x == y11 | x == y12 | x == y13
Code:
gen var2=1 if x == y`j' | x == y[`j'+1]

Comment