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:
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
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;
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;
"Special Missing" values are created like this:
data test;
db = .I;
run;
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;
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!
@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.
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!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.