IQR Function
Computes elements of the inter-quartile range for the Tukey Box Plot as defined in "The Elements of Graphing Data," Cleveland, W.S., Hobart Press, 1994, pp. 139-142.
Usage
result = IQR(yvalues)
Input Parameters
yvalues—An array of any Real data type.
Returned Value
result—A nine-element double array containing these elements, where IQR is the interquartile range (the 75th percentile minus the 25th percentile):
r(0) = Max—maximum value in yvalues
r(1) = Upper Extreme Value—max[i]{yvalues[i]: yvalues[i] <= (Q75 + 3.0*iqr)}
r(2) = Upper Adjacent Value—max[i]{yvalues[i]: yvalues[i] <= (Q75 + 1.5*iqr)}
r(3) = Q75 (The 75th quartile)
r(4) = Q50 (The 50th quartile or Median)
r(5) = Q25 (The 25th quartile)
r(6) = Lower Adjacent Value—min[i]{yvalues[i]: yvalues[i] >= (Q25 - 1.5*iqr)}
r(7) = Lower Extreme Value—min[i]{yvalues[i]: yvalues[i] >= (Q25 - 3.0*iqr)}
r(8) = min—smallest value in yvalues
Keywords
adjrangemult—The range multiplier for the Adjacent Value. Default = 1.5
extrangemult—The range multiplier for the Extreme Value. Default = 2*adjrangemult
Example
data = INDGEN(100) + 1
PM, IQR(data)
data = RANDOMN(s, 1000) * RANDOMN(s, 1000)
PM, IQR(data)
PM, IQR(data, Ext=4)