Functions That Determine the Ordering of Data Values

Function:    MIN

Purpose:    To determine the smallest non-missing value in a list of numeric values.

Syntax:      MIN(<of> numeric-values)

numeric-values is either a list of numeric values (numeric variables or numbers), separated by commas, or a list of variables in the form BASEn–BASEm (e.g., X1–X5). If the latter style is used, you must place the word “of” before the list.

If all of the arguments are missing, this function will return a missing value.

Examples

For these examples, X = 5, Y = ., Z = 7, X1 = 1, X2 = 2, X3 = 3, X4 = .

 

Function      

Returns

MIN(X,Y,Z)

5

MIN(OF X1-X4)

1

MIN(10,20,. ,30,40,50)

10

MIN(OF X1-X4,Y,Z)

1

See Program 7.5 for an ...

Get SAS Functions by Example, Second Edition, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.