MISSING Function


Returns a numeric result that indicates whether the argument contains a missing value

Category: Descriptive Statistics

Category: Character

Syntax

MISSING ( numeric-expression character-expression )

Arguments

numeric-expression

  • specifies numeric data.

character-expression

  • is the name of a character variable or an expression that evaluates to a character value.

Details

  • The MISSING function checks a numeric or character expression for a missing value, and returns a numeric result. If the argument does not contain a missing value, SAS returns a value of 0. If the argument contains a missing value, SAS returns a value of 1.

  • A character-expression is defined as having a missing value if the result of the expression contains all blank spaces.

  • A numeric-expression is defined as having a missing value if the result of the expression is missing (.), or if the expression contains special characters you used to differentiate among missing values. The special characters are the letters A through Z and the underscore , preceded by a period.

Comparisons

The NMISS function requires a numeric argument and returns the number of missing values in the list of arguments.

Examples

This example uses the MISSING function to check whether the input variables contain missing values.

 data values;     input @1 var1 3. @5 var2 3.;     if missing(var1) then        do;           put 'Variable 1 is Missing.';        end;     else if missing(var2) then        do;           put 'Variable 2 is Missing.';        end;     datalines;  127  988 195  ; 

In this example, the following message appears in the SAS log.

 Variable 2 is Missing. 

See Also

Functions and CALL Routines:

  • 'NMISS Function' on page 664

  • 'CALL MISSING Routine' on page 347




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