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: Merge problem; missing observation


From   Shubhabrata Mukherjee <joy_stat@yahoo.com>
To   stata forum <statalist@hsphsun2.harvard.edu>
Subject   st: Re: Merge problem; missing observation
Date   Thu, 9 Feb 2012 14:48:57 -0800 (PST)

Hi Anders,

  That did the trick. There was one observation which got dropped from each of the master and using files because of a typo in the last character for a snp.

  Thanks a lot,

    -Joey




----- Original Message -----
From: Shubhabrata Mukherjee <joy_stat@yahoo.com>
To: stata forum <statalist@hsphsun2.harvard.edu>
Cc: 
Sent: Thursday, February 9, 2012 1:27 PM
Subject: Re: Merge problem; missing observation



Hi Nick,

   I get the same result when I use a 1:1 merge.

Thanks,

 -Joey




----- Original Message -----
From: Shubhabrata Mukherjee <joy_stat@yahoo.com>
To: stata forum <statalist@hsphsun2.harvard.edu>
Cc: 
Sent: Thursday, February 9, 2012 12:45 PM
Subject: Merge problem; missing observation

Hi,

  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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index