# IQrange: The Interquartile Range In MKmisc: Miscellaneous Functions from M. Kohl

## Description

Computes (standardized) interquartile range of the `x` values.

## Usage

 ```1 2``` ```IQrange(x, na.rm = FALSE, type = 7) sIQR(x, na.rm = FALSE, type = 7, constant = 2*qnorm(0.75)) ```

## Arguments

 `x` a numeric vector. `na.rm` logical. Should missing values be removed? `type` an integer between 1 and 9 selecting one of nine quantile algorithms; for more details see `quantile`. `constant` standardizing contant; see details below.

## Details

This function `IQrange` computes quartiles as `IQR(x) = quantile(x,3/4) - quantile(x,1/4)`. The function is identical to function `IQR`. It was added before the `type` argument was introduced to function `IQR` in 2010 (r53643, r53644).

For normally N(m,1) distributed X, the expected value of `IQR(X)` is `2*qnorm(3/4) = 1.3490`, i.e., for a normal-consistent estimate of the standard deviation, use `IQR(x) / 1.349`. This is implemented in function `sIQR` (standardized IQR).

## Author(s)

Matthias Kohl Matthias.Kohl@stamats.de

## References

`quantile`, `IQR`.
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21``` ```IQrange(rivers) ## identical to IQR(rivers) ## other quantile algorithms IQrange(rivers, type = 4) IQrange(rivers, type = 5) ## standardized IQR sIQR(rivers) ## right-skewed data distribution sd(rivers) mad(rivers) ## for normal data x <- rnorm(100) sd(x) sIQR(x) mad(x) ```