The midhinge of a set of values is the mean of the first and third quartiles. See the Details section below for further information.
Value
A numerical value representing the computed measure.
A default NA
value is returned if the score can't be
computed.
Details
This measure of location is computed as:
$$MH(x) = \frac{Q_{1}(x) + Q_{3}(x)}{2} = \frac{median(x) + midhinge(x)}{2}$$
It is related to the interquartile range (\(IQR = Q_{3} - Q_{1}\)), which is a measure of dispersion.
Since missing values and NaN's are allowed only
if na.rm = TRUE
in quantile
,
if x
has NA
values and na.rm = FALSE
then NA
is returned.
Examples
x = c(0,1,1,2,3,3,3,100,NA)
midhinge(x = x, na.rm = TRUE)
#> [1] 2