This function computes the *interquartile mean*
of the x
values.
See the **Details** section below for further information.
Arguments
- x
(named) numerical vector
- i
(optional) numerical vector giving the position in
x
or character vector matching the names inx
. Ifmissing
ori = NULL
, the entirex
is considered for the computation of the score- na.rm
unused argument, provided for consistency with other functions.
NA
values are always removed fromx
before computation
Value
A numerical value representing the computed measure.
A default NA
value is returned if the score can't be
computed.
Details
The *interquartile mean* is a statistical measure of central tendency based on the truncated mean of the interquartile range. It is computed as:
$$IQM(x) = \frac{2}{n}\sum_{i=\frac{n}{4}+1}^{\frac{3n}{4}} x_{i}$$
where \(x_{i}\) is the \(i\)-th element of the ordered vector.
Like the median it is insensitive to outliers.