Date: Fri, 7 Sep 2007 10:49:05 -0400 Jim Groeneveld "SAS(r) Discussion" Jim Groeneveld Re: infinity representaion in SAS To: Yu Zhang

Hi Yu,

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 home.hccnet.nl/jim.groeneveld

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. > >Thanks! > >Yu > > >On 9/7/07, Howard Schreier <hs AT dc-sug DOT org> <nospam@howles.com> 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.]; >> run; >> >> > >> >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 >> the >> >>upper limit is a number with best12. format. it looks like capital >> letter >> >>'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 >> >>statement. >> >> >> >>Dose anyone know how to do it in SAS? >> >> >> >>Thanks! >> >> >> >>Yu >>

Back to: Top of message | Previous page | Main SAS-L page