@hjjijkkl wrote:
I have a big data and I want to keep records where the term variable is either 0 or missing for that specific ID. For example in the table below, ID 2 has term=1 so, I want to delete the whole record for ID 2 from the data. How can I do that?
So, I think your explanation needs clarification. In the first sentence, you want to keep records where term is either 0 or missing. Does that mean you want to keep just those records are either 0 or missing; or does that mean you want to keep the entire ID if you get a 0 or missing? Or does that mean something else?
In your example where ID 2 has term=1, you want to delete it. What if there are mixed 0s and missings and 1s for term for an ID?
--
Paige Miller