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: Missing value in -merge- output but not in _merge variable


From   Bert Jung <[email protected]>
To   [email protected]
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index