Functions and CALL Routines |
Category: | Descriptive Statistics |
Syntax | |
Arguments | |
Details | |
Comparisons | |
Examples |
Syntax |
ORDINAL(k,argument-1,argument-2<,...argument-n>) |
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.
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.
Examples |
SAS Statements | Results |
---|---|
x1=ordinal(4,1,2,3,-4,5,6,7); |
3 |
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.