Functions and CALL Routines |
Returns the kth smallest of the missing and nonmissing
values.
Category: |
Descriptive Statistics
|
ORDINAL(k,argument-1,argument-2<,...argument-n>)
|
-
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.
The ORDINAL function returns the kth smallest value, either missing or nonmissing, among the second through
the last arguments.
The ORDINAL function counts both missing and nonmissing
values, whereas the SMALLEST function counts only nonmissing values.
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.