Hi Statalist,
I'm trying to delete observations that meet a certain condition, but I can't find any command that can do this.
My sample is as follows
I want to delete
(1) all observations with Characteristic a
(2) all observations with the same id as the observations with Characteristic a
I know it is possible to do (1) with code like this
But I don't know how to do (2)
thanks for help.
I'm trying to delete observations that meet a certain condition, but I can't find any command that can do this.
My sample is as follows
Code:
ID Characteristic 1 a 1 b 2 a 3 c 3 c
(1) all observations with Characteristic a
(2) all observations with the same id as the observations with Characteristic a
I know it is possible to do (1) with code like this
Code:
drop if Characteristic == ( a )
thanks for help.
Comment