Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: list subjects with a similar value


From   [email protected]
To   [email protected]
Subject   Re: st: list subjects with a similar value
Date   Wed, 22 Mar 2006 14:28:52 -0800 (PST)

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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index