|Date: ||Fri, 7 Sep 2007 10:49:05 -0400|
|Reply-To: ||Jim Groeneveld <jim4stat@YAHOO.CO.UK>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Jim Groeneveld <jim4stat@YAHOO.CO.UK>|
|Subject: ||Re: infinity representaion in SAS|
The smallest negative value, which is interpreted by SAS as missing is ._
(dot underscore). The next one is just the . (dot) and than .A to .Z follow.
So there are 28 different missing values in SAS.
I think there is not a particular infinite value and maximum values to
represent may vary by hardware system type. If you want something
"infinite", very large, just take some quite large value, above the values
that you would regard "normal". Such a value would be non-missing though.
Regards - Jim.
Jim Groeneveld, Netherlands
Statistician, SAS consultant
On Fri, 7 Sep 2007 08:58:34 -0500, Yu Zhang <zhangyu05@GMAIL.COM> wrote:
>Thank you Howard! you are right.
>Indeed the infinity in SAS is a specical missing value as '.I'. after a
>series test, i found the number is ordered like this in SAS:
>All non-missing number>.Z>.....>.A>.
>Missing value is like negative infinity.
>the test statement' if number=.I' will return TRUE.
>On 9/7/07, Howard Schreier <hs AT dc-sug DOT org> <firstname.lastname@example.org> wrote:
>> On Fri, 7 Sep 2007 00:48:17 -0400, Ya Huang <ya.huang@AMYLIN.COM> wrote:
>> >Maybe you can try to compare it with the biggest floating number:
>> >if x > CONSTANT('BIG') then cx='INF' ?
>> If there is a representable number larger than CONSTANT('BIG'), then
>> CONSTANT('BIG') is returning an incorrect result.
>> What Yu has is a special missing value. As such, comparisons will treat it
>> as smaller than *negative* infinity. So, comparisons are not germane.
>> Just build a format something like
>> proc format;
>> value infinit .I = 'INF' other = [best12.];
>> >On Thu, 6 Sep 2007 23:03:27 -0500, Yu Zhang <zhangyu05@GMAIL.COM> wrote:
>> >>Dear All,
>> >>How an infinity umber is represented in SAS? I am using PROC freq to
>> >>calculate the 95% excat CI for Odds ratio. the upper excat limit is
>> >>infinity. when i output the result to a SAS dataset, the attribute of
>> >>upper limit is a number with best12. format. it looks like capital
>> >>'I'. What I am tring to do is to do a test if it is inifinty, i want to
>> >>replace it with word 'INF'. But I don't how to come up with the IF
>> >>Dose anyone know how to do it in SAS?