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]

st: RE: problem with merge


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: problem with merge
Date   Thu, 8 Apr 2010 15:59:27 +0100

People who know about -merge- really will want to see

1. the exact syntax you tried 

2. a snapshot of the data 

Why turn this into a word problem in which people have to try to imagine the latter and guess the former? 

Nick 
n.j.cox@durham.ac.uk 

Stefano Bonini

I have an inextricable issue with merge:
I have two datasets: "A" with a list of deals for which I know the investor (investors are duplicated because one investor can easily invest in more than one deal) and B with the full population of investors (hence unique obs) and their characteristics, such as location, assets, etc. Investors are stored by their names therefore those are and must be string variables. I also have missing obs in A (my master) because for some deals I don't  know who invested.
I am trying to merge the two sets to add the investor's characteristics (contained in B) to each deal. I confidently tried to merge them but the procedure doesn't match. Visual inspection confirms me that there should be matches (I mean, _merge=3) but the command returns just _merge=1 or 2.
I checked the formats, blanks and everything i could but I just can't make it work.
Any clue on what may cause this weird behavior? 

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