Returns the range of values
Category: Descriptive Statistics
RANGE ( argument,argument ,...)
argument
is numeric. At least one nonmissing argument is required. Otherwise, the function returns a missing value. The argument list can consist of a variable list, which is preceded by OF.
The RANGE function returns the difference between the largest and the smallest of the nonmissing arguments.
SAS Statements | Results |
---|---|
x0=range(.,.); | . |
x1=range(-2,6,3); | 8 |
x2=range(2,6,3,.); | 4 |
x3=range(1,6,3,1); | 5 |
x4=range(of x1-x3); | 4 |