Home > Data Services > Catalog . Restricted Data . Census . ACS

Search Data Services

Meta Search
search across all the following databases:

Data Catalog
Data and documentation

KnowledgeBase
Common questions and answers.

Resources
Entire collection of data resources.


Latest Data News

RSS Feed icon

Lessons from North of the Border

Nerd Alert: Dictionary of Numbers

International Migration Statistics for the US

Open Data Executive Order

Measuring Marriage & Divorce among Same-Sex Couples

How to Differentiate Among Different Missing Values

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.