Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: logical missing as true


From   Paul Seed <[email protected]>
To   [email protected]
Subject   st: Re: logical missing as true
Date   Mon, 12 Jan 2004 16:38:00 +0000

Some more thoughts:

As we have been reminded by Alan Reese & Nick Cox
Stata  consistently treats missing as true.

By contrast, all given SPSS's logical expressions are
correct if "missing" is read as "false".  Moreover, in their own words:"The
assignment is executed only if the logical expression is true."

However, I am not sure how SPSS evaluates "not missing".
I would expect SPSS to treat it as "missing".

If we are to change this, I would like two things:

A warning when missing values are evaluated in a logical expression

An option to reset the logical value of "missing" to either true (default),
false, or error.  If error is selected, evaluating logical expressions
including missing values will generate  an error code, and (usually)
stop execution of code.

If available, I would probably set missing = error in most programs,
as it is is almost always a mistake when I do not error-trap the
missing values.

Whatever else StataCorp decide to do, I would expect the current




*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index