1. Find the mothers with multiple pregnancies.
I do this by sorting the id's and generating a tag.
sort id
egen tag=tag(id)
2. Now I want to browse all the records for all the mothers that have multiple pregnancies.
Currently I do:
browse if tag==0 //to find the id's
browse if id==1 | id==4
Is there a more efficient way to do this? Maybe flag the id's that have a tag==0?
id | tag |
1 | 1 |
1 | 0 |
2 | 1 |
3 | 1 |
4 | 1 |
4 | 0 |
5 | 1 |
6 | 1 |
7 | 1 |
Thanks,
Maria
0 Response to Flag id's that have a tag==0
Post a Comment