There can be different reasons for a value to be missing.
If you need to be able to distinguish between types of missing values, SAS allows you to designate up to 27 special missing values. Data have to be read in as numeric to use these special missing values.
Special
missing values
are represented by two characters: a decimal point followed by either a letter
or an underscore (for example, .H or ._). The SAS System does not distinguish
between lowercase and uppercase letters (e.g., .a and .A are treated the same).
You can set values to special missing values within the DATA step with program statements such as this:
if age lt 0 then age=.n;SAS also provides the MISSING statement. Ordinarily, a missing numeric value must be represented in input data by a period. By using the MISSING statement, alphabetic characters can be read and stored as special missing values rather than invalid numeric values. In the example below,
data test;
missing X Y;
input id score;
the missing statement would allow input values X and Y to be read as special
missing values (for the variables id, score).
PROC PRINT would display any such values as X or Y. When the SAS System prints
a special missing value, it prints only the letter or underscore.
PROC FREQ also displays the special missing value codes if the /missprint option is used.
For example if one has a variable age with valid values ranging from 1-99 and the following missing data codes:
.a inappropriate, question not asked
.d don't know
. no answer
proc freq; tables age;
would report how many cases are missing on age with no distinction among the different types of missing value codes.
proc freq; tables age / missprint;
would report how many respondents have a value of .,
.a, and .d.
Recent resources, events, news
Knodel et al. "Gendered Housework in Vietnam." PSC Research Report.
Couper. Designing Effective Web Surveys
Monday, Oct 13
Jamie Jones
"Fertility & Risk Aversion on Utah Frontier"
W A R N I N G
If you are reading this, it may be that you are using rather old web browsing software that does not support modern international Web technology standards. For a better experience of the Web and this site in particular, please upgrade your web browser software today. The following are good choices: Firefox 2; Opera 9; Safari 3.