Dear all:
I have a problem when dealing with my data, for one variable. There is only "1","2", and "0", I want to find the first "1", and then find the next "2", then find the next "1",and so on like the following example:
from the right to the left
0 0
0 0
1 1
1 0
1 0
1 0
0 0
1 0
2 2
2 0
1 1
1 0
Thank you!
Best wishes
Related Posts with A loop problem
scatter plots from imputed dataI have performed multiple imputation on some 70 continuous variables using mi imputed (regress) chai…
invalid (variable) r(198) - What does this mean?Hi there, I am trying to run a factor analysis on state ( Code: factor, R1, R2, etc, pcf however…
Check values from one variable against another variableHello, I'd like to write a code which checks if the values in one variable appear atleast once in a…
Linear Mixed Models with repeated measures design; postestimation/contrasts issues in RCT designFor our cluster randomized controlled trial we face the issue in STATA of reporting the means and co…
obtaining the first three digitsI have naics codes that have six digits, and I want to get the first three digits in each of them an…
Subscribe to:
Post Comments (Atom)
0 Response to A loop problem
Post a Comment