I have a dataset like this.
Code:
clear input id month 1 1 1 2 1 3 1 4 1 5 2 1 2 2 2 3 2 4 2 5 3 1 3 2 3 3 3 4 3 5 end list describe
There are 150 months in consecutive order to keep. How could I write a loop for this purpose instead of using a command such as: keep if month==2 | month==3 | month==4...
Thank you very much in advance for your valuable support.
Lynn
0 Response to keep observations with loop
Post a Comment