BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
kumarayas
Fluorite | Level 6

I have a SAS dataset where I see a letter "I" (Capital i) in numeric column. What does it mean?

I don't understand as it is a numeric variable and it should not contain this unless it means something else. I tried to add/subtract a number to it and it returned "." (null).

 

See below picture:

kumarayas_0-1585225800909.png

Here, "Factor" variable in 2nd row has letter "I" as Highlighted. The 3rd variable "db" is same as "factor" but with no format applied.

 

Table properties:

Compressed: CHAR

Encoding: wlatin1 Western (windows)

 

SAS version: 9.4m5

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hi @kumarayas,

 

While programmers are free to use special missing values such as .I for arbitrary purposes, there are contexts in which .I has a special meaning: infinity. For example, the DIVIDE function and PROC TTEST produce this particular special missing value with the meaning "infinity" in certain situations (see code examples below). But even then it's still a missing value and recognized as such, e.g., by functions like MISSING, NMISS or CMISS.

/* Example 1 (Result: x=.I) */

data test;
x=divide(1,0);
run;

/* Example 2 (Result: UpperCLMean=.I) */

ods output conflimits=cl;
proc ttest data=sashelp.class sides=u;
var age;
run;

View solution in original post

6 REPLIES 6
Tom
Super User Tom
Super User

Most likely it is a special missing value.  In addition to the normal missing value, which is represented by a period, SAS allows 27 special missing values. They are represented in code by period followed by a letter or underscore. In listing/printing the period is not displayed.

 

Try something like this to see how many observations have .I for the DB variable.

proc print data=MYDATA;
  where db=.i ;
run;
FreelanceReinh
Jade | Level 19

Hi @kumarayas,

 

While programmers are free to use special missing values such as .I for arbitrary purposes, there are contexts in which .I has a special meaning: infinity. For example, the DIVIDE function and PROC TTEST produce this particular special missing value with the meaning "infinity" in certain situations (see code examples below). But even then it's still a missing value and recognized as such, e.g., by functions like MISSING, NMISS or CMISS.

/* Example 1 (Result: x=.I) */

data test;
x=divide(1,0);
run;

/* Example 2 (Result: UpperCLMean=.I) */

ods output conflimits=cl;
proc ttest data=sashelp.class sides=u;
var age;
run;
novinosrin
Tourmaline | Level 20

Thank you Sir @FreelanceReinh  for sharing. Always spot on and to the point. Kudos! Interestingly, I ran into something similar a week ago viz. special missings, though was able to figure the details after having read an amazing paper by @Quentin  on special missings for BY GROUP processing that I used for scoring. Cheers!

FreelanceReinh
Jade | Level 19

@novinosrin wrote:

... read an amazing paper by @Quentin  on special missings ...


I assume you mean "How to Represent Missing Data: Special Missing Values vs. 999999999." Indeed, this is really good and timeless. Thanks.

Quentin
Super User

Thanks for your kind words about my paper, @novinosrin  and @FreelanceReinh .  That was the first UG paper I ever wrote.  (I was too scared to present, so I did it as a poster for long-lost NESUG).  Always nice to know that a paper has been read!

BASUG is hosting free webinars Next up: Mark Keintz presenting History Carried Forward, Future Carried Back: Mixing Time Series of Differing Frequencies on May 8. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 2143 views
  • 11 likes
  • 6 in conversation