Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: merging datasets


From   Neil Shephard <nshephard@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: merging datasets
Date   Wed, 18 Aug 2010 15:40:20 +0000

010/8/18 Χρυσούλα Γιαννικοπούλου <chrygiann@gmail.com>:
> Hi Neil,
>
> thanks for your reply!
>
> Sorry, it was my fault in email. In stata I am trying to merge the
> bvdep_id_mother, indeed.
>
> When I do  'm:1' merge I have the following error message:
> ********
> bvdep_id_mother was str11 now str24
> variable bvdep_id_mother does not uniquely identify observations in
> the using data
> r(459);
> ***********
>
> What is going wrong?

Well Stata is telling you whats going wrong, simply that the
assumption that the dataset where you think observations are unique
based on bvdep_id_mother is false.

So, in your B.dta you can identify these by...

set mem 500m
use "B.dta"
rename  acquirorbvdepidnumber bvdep_id_mother
duplicates report bvdep_id_mother

Work out how/why these are there and drop those before saving and merging.

Neil

-- 
"One should as a rule, respect public opinion in so far as is
necessary to avoid starvation and to keep out of prison, but anything
that goes beyond this is voluntary submission to an unnecessary
tyranny, and is likely to interfere with happiness in all kinds of
ways..." - Bertrand Russell

Email - nshephard@gmail.com
Website - http://slack.ser.man.ac.uk/
Photos - http://www.flickr.com/photos/slackline/

*
*   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   |   Site index