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 at the end of May, and its replacement, statalist.org is already up and running.


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

st: Missing value in -merge- output but not in _merge variable


From   Bert Jung <bjung59@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Missing value in -merge- output but not in _merge variable
Date   Sun, 4 Sep 2011 11:48:47 -0400

Dear Statalisters,

I am trying to understand the following output from a 1:1 merge in
Stata 11.2.  The merge output shows a missing value for _merge==3 but
a tab shows observations with _merge==3.


(There are no other _merge variables in the two datasets.)

. merge 1:1 hhid pid using test.dta

    Result                           # of obs.
    -----------------------------------------
    not matched                        21,164
        from master                    20,260  (_merge==1)
        from using                        904  (_merge==2)

    matched                                 .  (_merge==3)
    -----------------------------------------

. tab _merge

                 _merge |      Freq.     Percent        Cum.
------------------------+-----------------------------------
        master only (1) |     20,260       60.26       60.26
         using only (2) |        904        2.69       62.95
            matched (3) |     12,455       37.05      100.00
------------------------+-----------------------------------
                  Total |     33,619      100.00



A similar question was raised in
http://www.stata.com/statalist/archive/2010-11/msg00661.html.  That
question remained unanswered and I have been unable to find an
explanation on the list or in the manuals.

Any thoughts warmly welcome.

Thanks, Bert
*
*   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