Hello, it's my first post in Statalist.Thank you for reading my post. I'd like to ask you a question.
Here is a sample of my data:
A B
1 A01B
0 A01B
0 A01C
0 A01C
1 A01D
1 A01D
My question is, how can I keep the observations in B which contains both 1 and 0 in A, and drop the observations which contains only 0 or 1.(That is to say,how can I keep A01B, but drop A01C and A01D).
Thank you very much!
Here is a sample of my data:
A B
1 A01B
0 A01B
0 A01C
0 A01C
1 A01D
1 A01D
My question is, how can I keep the observations in B which contains both 1 and 0 in A, and drop the observations which contains only 0 or 1.(That is to say,how can I keep A01B, but drop A01C and A01D).
Thank you very much!
Comment