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]

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


From   khigbee@stata.com
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Missing value in -merge- output but not in _merge variable
Date   Tue, 06 Sep 2011 09:51:24 -0500

Bert Jung <bjung59@gmail.com> asks:

> 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


I am not sure if you are using Stata 11 or Stata 12.  If using
Stata 11 (also a good idea for Stata 12) make sure that you have
updated your Stata to the latest available update.  There were
some updates to Stata 11 with fixes to -merge- that might apply
to what you report above (for instance item 4 in the 30mar2011
update of Stata 11).  Type -update query- in Stata and follow the
directions to update your Stata.

If after updating your Stata you still have this problem, please
send the master and using datasets and the commands you used to
Stata's technical support

    tech_support@stata.com

and we will look into the problem.


Ken Higbee    khigbee@stata.com
StataCorp     1-800-STATAPC

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