Date: Tue, 24 Feb 2004 18:09:16 -0500
Reply-To: "Chang Y. Chung" <chang_y_chung@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Chang Y. Chung" <chang_y_chung@HOTMAIL.COM>
Subject: Re: Floating point storage of missing values
On Tue, 24 Feb 2004 15:13:00 -0700, Michael Murff <MurffMJ@LDSCHURCH.ORG>
wrote:
>Hi SAS-L,
>
>I recently came upon the idea that SAS actually stores very small negative
>numbers in place of missing data. If this is true then it seems that would
>potentially create problems when conditioning output in terms of a "less
than"
>and not including a lower bound.
>
> if var<100 then output;
>
>So perhaps this statement would output records with a missing value for
var as
>well as the desired ones that meet the face value of the condition?
>
>Does anyone have more information on this point?
Hi, Mike,
Welcome to sas! Yes, you are correct in that a missing value (.) is
smaller than any other numeric non-missing values. Thus, you are correct
also in that your statement would output observations that have missing
values on var. Given this, sas users tend to develop a habit of using the
missing() function a lot, like:
if not missing(var) and 100 < var then outout;
I prefer the above to:
if . < var < 100 then output;
But someone else may have different opinion.
The order of values from the smallest to largest is very well-known and
well-documented.
Would you like to know something crazy also?
Did you know that SAS has bunch of other numeric missing values, that is,
other than a dot? See the documentation for what they are and how they are
compared to each other and to non-missing values.
In stata, the same, a dot, represents a missing value, but it is larger,
not smaller, than any numeric non-missing values. Oh, my!
Cheers,
Chang
|