Next: , Previous: Trigonometry, Up: Functions



5.7.4 Missing-Value Functions

Missing-value functions take various numeric arguments and yield various types of results. Except where otherwise stated below, the normal rules of evaluation apply within expression arguments to these functions. In particular, user-missing values for numeric variables are converted to system-missing values.

— Function: MISSING (expr)

Returns 1 if expr has the system-missing value, 0 otherwise.

— Function: NMISS (expr [, expr]...)

Each argument must be a numeric expression. Returns the number of system-missing values in the list, which may include variable ranges using the var1 TO var2 syntax.

— Function: NVALID (expr [, expr]...)

Each argument must be a numeric expression. Returns the number of values in the list that are not system-missing. The list may include variable ranges using the var1 TO var2 syntax.

— Function: SYSMIS (expr)

When expr is simply the name of a numeric variable, returns 1 if the variable has the system-missing value, 0 if it is user-missing or not missing. If given expr takes another form, results in 1 if the value is system-missing, 0 otherwise.

— Function: VALUE (variable)

Prevents the user-missing values of variable from being transformed into system-missing values, and always results in the actual value of variable, whether it is valid, user-missing, or system-missing.