Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Nick Cox" <n.j.cox@durham.ac.uk> |
To | <statalist@hsphsun2.harvard.edu> |
Subject | st: RE: A modest proposal - missing data doesn't count |
Date | Mon, 14 Jun 2010 20:49:42 +0100 |
This comes up on the list, understandably, about once a year. I think everybody has some, indeed much, sympathy with the problem, but no-one ever likes anybody else's solution. To make even a case for his new function, Allan has got to show that it gives sensible answers in all situations in which it might be applied, and not just inequalities. Just as it's a feature that the name -value()- is not bespoke, it is also a weakness that it carries no meaning that is utterly evident and precise. For example, is value(.) the same or different from value(.a)? Does value(x) < 10 include or exclude missings? If they're excluded too, then Allan wants a three-way logic in Stata, and the quickest way to get that is to write your own clone of Stata. (Allow 25 years.) (If this isn't Phil Schumm's point, it's very close.) -inrange()- is a well-defined function available for comparisons. I don't think many people use it, perhaps because its detailed rules don't stick in one's memory. By the time most people have looked up the syntax they could write out a longer expression avoiding it. I think -value()- could hardly jump such a hurdle. Nick n.j.cox@durham.ac.uk Allan Reese Feeling aggrieved at years of typing expressions like "if x>10 & x<.", and feeling sure there must be lots of wrong results from Stata because users didn't notice that "x>10" includes cases with the missing value, might I request a new code function? The name value() is available. While users would have to remember to use it, it would quickly become a habit to type "if value(x)>10" etc, with the effect that the expression would evaluate as true only when x had a non-missing value. A check box could be added to the menu interface as a reminder. * * 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/