IQR

Example Data 244 238 1
Webform
The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.
Help

The Interquartile Range

Description

computes interquartile range of the x values.

Usage

IQR(x, na.rm = FALSE, type = 7)

Arguments

x

a numeric vector.

na.rm

logical. Should missing values be removed?

type

an integer selecting one of the many quantile algorithms, see quantile.

Details

Note that this function computes the quartiles using the quantile function rather than following Tukey's recommendations, i.e., IQR(x) = quantile(x, 3/4) - quantile(x, 1/4).

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.

References

Tukey, J. W. (1977). Exploratory Data Analysis. Reading: Addison-Wesley.

Examples

IQR(rivers)
R Output Dataset Referenced Date
IQR R Dataset / Package datasets / co2 May 30, 2017
IQR Example Data May 30, 2017
IQR Example Data May 30, 2017
IQR Example Data May 30, 2017
IQR Example Data May 30, 2017
Title Authored on Content type
R Dataset / Package wooldridge / admnrev March 9, 2018 - 1:06 PM Dataset
R Dataset / Package car / Hartnagel March 9, 2018 - 1:06 PM Dataset
R Dataset / Package psych / Schmid March 9, 2018 - 1:06 PM Dataset
R Dataset / Package mi / nlsyV March 9, 2018 - 1:06 PM Dataset
R Dataset / Package wooldridge / audit March 9, 2018 - 1:06 PM Dataset