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
Panel Cointegration for data with gaps in the time seriesHello, I have panel data N=19 and T=29 with gaps in the time series. I need to do cointegration. The…
Combining multiple observations with same unique ID into one observationHello, I want to combine multiple observations with same unique ID into a single observation and re…
Creating Annual/Yearly VariableHello Statalisters, I need to generate an annual variable from 2014 to 2020 in my data set. Current…
Trouble Exporting a Table 1 Into a PDF Directly From Stata CommandsHi all, I am currently doing research, so I will use a sample example from this link to ask my quest…
Question (Omitted for multicollinearity)Dear all, I am running some regressions in which I want to investigate the role of foreign technolo…
Subscribe to:
Post Comments (Atom)
0 Response to A loop problem
Post a Comment