MAX Function


Returns the largest value

Category: Descriptive Statistics

Syntax

MAX ( argument,argument , )

Arguments

argument

  • is numeric. At least two arguments are required. The argument list may consist of a variable list, which is preceded by OF.

Comparisons

The MAX function returns a missing value (.) only if all arguments are missing.

The MAX operator (<>) returns a missing value only if both operands are missing. In this case, it returns the value of the operand that is higher in the sort order for missing values.

Examples

SAS Statements

Results

x=max(8,3);

8

x1=max(2,6,.);

6

x2=max(2.-3,1,-1);

2

x3=max(3,.,-3);

3

x4=max(of x1-x3);

6




SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net