Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Detecting Duplicate Records


From   "Marcela Perticara" <[email protected]>
To   <[email protected]>
Subject   st: Re: Detecting Duplicate Records
Date   Wed, 14 Aug 2002 14:32:32 -0500

You should use -dups-

STB-41  dm53 . . . . . . . .  Detection and deletion of duplicate
observations
        (help dups if installed) . . . . . . . . . . T. Steichen and N. J.
Cox
        1/98    pp.2--4; STB Reprints Vol 7, pp.52--55
        provides information about unique and duplicate observations
        and, optionally, drops all duplicate observations

--------------------------------------------
Profesor Asistente
Universidad Alberto Hurtado
Erasmo Escala 1835
Santiago, Chile
Phono: 671-7130 anexo 267
----- Original Message -----
From: "Siyam,AA (pgr)" <[email protected]>
To: <[email protected]>
Sent: Wednesday, August 14, 2002 1:22 PM
Subject: st: Detecting Duplicate Records


> Dear  Stata-users,
>
> I have a household roster data file which consists of about 20 variables
measured on household members.  I have my doubts that the persons_id within
a household is not unique.  Is there a way I can "mass-check" all 20
variables between members of the same households to determine duplicate
records.  I thought of the following:
>
> sort hhid persons_id
>
> for var V1-V20: gen DX=X[_n]==X[_n-1]
>
> quietly by hhid: egen DSUM=rsum( DV1. .... DV20)
>
> quietly by hhid: drop if DSUM[n]==20
>
>
> Does that make sense!
>
> Many thanks for your thoughts in advance...
>
> Amani
>
>
>
> *
> *   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/


______________________________________
Universidad Alberto Hurtado
http://www.uahurtado.cl
*
*   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