Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Jeph Herrin <stata@spandrel.net> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: Puzzling error with merge |
Date | Mon, 13 Jan 2014 16:56:47 -0500 |
tab StudyID, missing cheers, Jeph On 1/13/2014 4:31 PM, Phil Schumm wrote:
On Jan 13, 2014, at 3:11 PM, David Hoaglin <dchoaglin@gmail.com> 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/
* * 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/