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: