IQR Function

Returns the interquartile range.

Category: Descriptive Statistics

Syntax

IQR(value-1 <,value-2...> )

Required Argument

value

specifies a numeric constant, variable, or expression for which the interquartile range is to be computed.

Details

If all arguments have missing values, the result is a missing value. Otherwise, the result is the interquartile range of the nonmissing values. The formula for the interquartile range is the same as the one that is used in the UNIVARIATE procedure. For more information, see Base SAS Procedures Guide.

Example

The following SAS statements produce these results.
SAS Statement
Result
iqr=iqr(2,4,1,3,999999);
put iqr;
 2

See Also