Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: AW: How to get rid of duplicate individuals in a dataset?


From   Ada Ma <heu034@googlemail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: AW: How to get rid of duplicate individuals in a dataset?
Date   Sun, 13 Sep 2009 20:30:57 +0100

Another thing you might find useful in the future is to use -merge-,
and pay attention to what the -update- option can do for you.

HTH


On Sun, Sep 13, 2009 at 8:14 PM, Ekaterina Hertog
<ekaterina.hertog@sociology.ox.ac.uk> wrote:
> Thanks a lot! It worked after a bit of tinkering needed to ensure that specifically the observations from a fuller dataset are kept,
> warm regards,
> Ekaterina
>
>
> In message <000001ca3491$b05652b0$1102f810$@weiss1@gmx.de> statalist@hsphsun2.harvard.edu writes:
>>
>> <>
>>
>> " I cannot use duplicates I think because the two datasets do not have
>> exactly the same variables"
>>
>>
>>
>> The -duplicates- suite of commands allows you to specify a -varlist- (which
>> should contain the variables common to both datasets), so give it a try...
>>
>>
>> HTH
>> Martin
>>
>> -----Ursprüngliche Nachricht-----
>> Von: owner-statalist@hsphsun2.harvard.edu
>> [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Ekaterina
>> Hertog
>> Gesendet: Sonntag, 13. September 2009 18:37
>> An: statalist@hsphsun2.harvard.edu
>> Betreff: st: How to get rid of duplicate individuals in a dataset?
>>
>> Dear all,
>>
>> I had two datasets of partially overlapping individuals (and their
>> characteristics) which I merged into 1 file using append. At the moment
>> cannot think of how to get rid of the individuals which appear twice in the
>> resulting dataset because of the overlap in the initial datasets. I cannot
>> use duplicates I think because the two datasets do not have exactly the same
>> variables. To be precise variables of dataset1 are a subset of variables of
>> dataset2. As a result when I merged them into 1 dataset the entries for the
>> same customer coming from dataset1 is not exactly identical to the entry
>> coming from dataset2. I need to remove all the entries for those individuals
>> from dataset1 which also appear in dataset2 and keep all the non-overlapping
>> individuals.
>>
>> I will be very grateful for any advice,
>> Warm regards,
>> Ekaterina
>>
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/statalist/faq
>> *   http://www.ats.ucla.edu/stat/stata/
>>
>>
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/statalist/faq
>> *   http://www.ats.ucla.edu/stat/stata/
>
> --
> Ekaterina Hertog (nee Korobtseva)
> Nissan Institute of Japanese Studies
> 27 Winchester Road, Oxford
> OX2 6NA
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>



-- 
Ada Ma
Research Fellow
Health Economics Research Unit
University of Aberdeen, UK.
http://www.abdn.ac.uk/heru/
Tel: +44 (0) 1224 555189
Fax: +44 (0) 1224 550926

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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