there may be a more elegant way to do this, albeit this is but one attempt:
* obtain the number of duplicates w/in date of birth
bysort date_of_birth: gen dob_duplicate = _N
* tag each combination of DOB & the duplicates therein
egen dob_tag = tag(date_of_birth dob_duplicate)
* list the ID & DOB associated w/ each repeated DOB...
list id date_of_birth dob_tag if dob_tag
note that i didn't subject this to a rigorous test...but i think it works,
nonetheless.
--clint
> Hi,
>
> I have a large database and would like to list the idnumber of all
> subjects with the same date of birth. How do I do this? I have tried
> .duplicate, but can figure out how to do it. Thanks.
>
> Raoul
>
> *
> * For searches and help try:
> * http://www.stata.com/support/faqs/res/findit.html
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/