# RE: st: My last word on strange world

 From "Nick Cox" <[email protected]> To <[email protected]> Subject RE: st: My last word on strange world Date Thu, 10 Jan 2008 17:37:08 -0000

```Chasing up that reference, it seems to me that in what you
proposed, -if2- is the lesser part of the proposal, as logical
expressions
often arise separately from -if-.

The larger part of the proposal is a three-way logic:

true AND true = true
true OR true = true
true AND false = false
true OR false = true
false AND false = false
false OR false = false
true AND missing = missing
true OR missing = true
missing AND missing = missing
missing OR missing = missing
false AND missing = false
false OR missing = missing

In essence, there are 6 pairs here that we know already,

true AND true = true
true OR true = true
true AND false = false
true OR false = true
false AND false = false
false OR false = false

and (to my first reading) two that seem "obvious"

missing AND missing = missing
missing OR missing = missing

and four that don't seem totally "obvious" to me,
at least not as a set

true AND missing = missing
true OR missing = true
false AND missing = false
false OR missing = missing

No doubt there's a larger story here.

Nick
[email protected]

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Richard
Williams
Sent: 10 January 2008 17:07
To: [email protected]; [email protected]
Subject: RE: st: My last word on strange world

At 11:40 AM 1/10/2008, Nick Cox wrote:
>Manifestly, Stata doesn't do as Richard suggests. In each case,
missings
>on x will be ignored only if you specify that, e.g., by -inrange(x, 42,
>.)-.
>
>I think I once proposed, or at any rate once thought of, a -gt()-
>function (those not familiar with old Fortrans can think "greater
than")
>such that
>
>gt(x, y) is 1 if x > y & x < . & y < . and 0 otherwise.
>
>Similarly ge(), lt(), le() for >=, <, <=.
>
>But I would be surprised at any enthusiasm for this. Everyone seems to
>want to want to keep >, >=, <, <= together with "do what I mean".

The proposal I made 4 years ago was for an if2 qualifier, where ifs
would follow the same logic that SPSS does.  A little quirky, I know,
but then all existing syntax continues to work fine as is:

http://www.stata.com/statalist/archive/2004-01/msg00136.html

-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  [email protected]
WWW:    http://www.nd.edu/~rwilliam

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

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