MISSING Statement


Assigns characters in your input data to represent special missing values for numeric data

Valid: anywhere

Category: Information

Syntax

MISSING character(s) ;

Arguments

character

  • is the value in your input data that represents a special missing value.

  • Range: Special missing values can be any of the 26 letters of the alphabet (uppercase or lowercase) or the underscore (_).

  • Tip: You can specify more than one character.

Details

The MISSING statement usually appears within a DATA step, but it is global in scope.

Comparisons

The MISSING= system option allows you to specify a character to be printed when numeric variables contain ordinary missing values (.). If your data contain characters that represent special missing values, such as a or z , do not use the MISSING= option to define them; simply define these values in a MISSING statement.

Examples

With survey data, you may want to identify certain kinds of missing data. For example, in the data, an A can mean that the respondent is not at home at the time of the survey; an R can mean that the respondent refused to answer. Use the MISSING statement to identify to SAS that the values A and R in the input data lines are to be considered special missing values rather than invalid numeric data values:

 data survey;     missing a r;     input id answer;     datalines;  001 2  002 R  003 1  004 A  005 2  ; 

The resulting data set SURVEY contains exactly the values that are coded in the input data.

See Also

Statement:

  • UPDATE Statement on page 1414

System Option:

  • MISSING= System Option on page 1564




SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net