Statalist


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

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


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: How to get rid of duplicate individuals in a dataset?
Date   Sun, 13 Sep 2009 18:46:05 +0200

<> 

" 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/



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