Dear Stata users,

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
and I want to keep observations of month 2, 3 and 4.

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