Hi Everyone,
Please, I need help to remove duplicates in Stata. I have decided to post it again because i didnt do a good job explaining what the problem is in the original post. I have dataset which contains over 200 observations. What I want to do is to remove the duplicates and retain a unique value for each observation. For the same observations with Yes and Null, I want to keep the Yes. For same observations with No and Null values, I want to keep the No. For same observations with only null, I want to keep just 1 null.
Please, I need help to remove duplicates in Stata. I have decided to post it again because i didnt do a good job explaining what the problem is in the original post. I have dataset which contains over 200 observations. What I want to do is to remove the duplicates and retain a unique value for each observation. For the same observations with Yes and Null, I want to keep the Yes. For same observations with No and Null values, I want to keep the No. For same observations with only null, I want to keep just 1 null.
| ID Number | Value |
| D711 | null |
| D711 | null |
| D711 | null |
| D711 | Yes |
| D714 | No |
| D714 | null |
| D714 | null |
| D715 | Yes |
| D715 | null |
| D722 | null |
| D722 | null |
| D729 | No |
| D729 | null |
| D722 | Yes |
| D723 | null |
| D723 | null |
| D723 | null |
| D728 | null |
| D728 | null |
| D728 | null |

Comment