Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: RE: Merge problem; missing observation


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: Merge problem; missing observation
Date   Thu, 9 Feb 2012 21:11:28 +0000

I don't know if this will make any difference but this certainly sounds like a 1:1 merge. 

Nick 
[email protected] 

Shubhabrata Mukherjee

  I have two files with the same # of observations but when I try to merge them somehow the merged dataset has one less observation. I checked that there was no observations which was dropped. What am I dong wrong here?

Thanks,

 -Joey

E.g.

#############

 File A

duplicates report snp

--------------------------------------
   copies | observations       surplus
----------+---------------------------
        1 |       691677             0
--------------------------------------


#############

 File B


duplicates report snp

--------------------------------------
   copies | observations       surplus
----------+---------------------------
        1 |       691677             0
--------------------------------------

#####################
merge file A with file B

merge m:1 snp using fileB, assert(match master) keep(match)

   Result                           # of obs.
    -----------------------------------------
    not matched                             0
    matched                           691,676  (_merge==3)
    -----------------------------------------


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index