I have something that is confusing me. I have a dataset and want to merge it with another, but before I can do that I have to drop all entries which are the same personID, same varA, but different varB.
I want to table 1 to become table 2.
Is there a way to do this?
I have been trying to use this explanation, https://www.stata.com/support/faqs/d...-observations/ but have not been able to get it to work yet.
Thanks.
Table 1
| PersonID | varA | varB | 
| 1 | a | ab | 
| 1 | a | ab | 
| 2 | c | cd | 
| 3 | a | ab | 
| 3 | a | ac | 
| 4 | z | zy | 
| 4 | z | zy | 
| 5 | z | zy | 
| 5 | z | zx | 
| PersonID | varA | varB | 
| 1 | a | ab | 
| 1 | a | ab | 
| 2 | c | cd | 
| 4 | z | zy | 
| 4 | z | zy | 

0 Response to Excluding*data entries
Post a Comment