ORDINAL Function
Returns the kth smallest of the missing and nonmissing values.
| Category: | Descriptive Statistics |
|---|
Table of Contents
Syntax
Required Arguments
k
is a numeric constant, variable, or expression with an integer value that is less than or equal to the number of subsequent elements in the list of arguments.
argument
specifies a numeric constant, variable, or expression. At least two arguments are required. An argument can consist of a variable list, preceded by OF.
Details
The ORDINAL function returns the kth smallest value, either missing or nonmissing, among the second through the last arguments.
Comparisons
The ORDINAL function counts both missing and nonmissing values, whereas the SMALLEST function counts only nonmissing values.
Example
data one;
x1=ordinal(4, 1, 2, 3, -4, 5, 6, 7);
put x1=;
run;
These statements produce this result:
x1=3