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]

Re: st: Puzzling error with merge


From   David Hoaglin <[email protected]>
To   [email protected]
Subject   Re: st: Puzzling error with merge
Date   Mon, 13 Jan 2014 17:03:52 -0500

Phil,

It was easy to use the Browser.  The master file contained no fewer
than 39 extra observations with blank StudyID.

Now you see 'em.  Now you don't!

Thanks again.

David Hoaglin

On Mon, Jan 13, 2014 at 4:31 PM, Phil Schumm <[email protected]> wrote:
> On Jan 13, 2014, at 3:11 PM, David Hoaglin <[email protected]> wrote:
>> On each of those Stata data files, I used -tabulate- with StudyID as a categorical variable (its type is string).  I expected the output to show a frequency of 2 (or more) for any duplicate, but each value of StudyID had a frequency of 1 in both files, and the total frequency was correct in both files.
>
>
> That is exactly what you would see if you have observations for which StudyID is missing (i.e., they would not appear in the table).  Try
>
>     assert !mi(StudyID)
>
> in both datasets; if this fails, you can either
>
>     count if mi(StudyID)
>
> or examine the data in the Browser.
>
>
> -- Phil

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index