Skip to contents

This function calculates the left medcouple (LMC) and the right medcouple (RMC) for a given numeric vector. The left and right medcouples provide a robust measure of the distribution's tail behavior in the presence of outliers or contaminated data.

Usage

medcouple_weight(x, drop.na = FALSE)

Arguments

x

A numeric vector.

drop.na

Logical value indicating whether to remove missing values (NA). If FALSE (default) and x contains missing values, NA is returned.

Value

A tibble with two numeric columns:

  • LMC: Left medcouple.

  • RMC: Right medcouple.

Details

The left and right medcouples are a robust measure of tail weight based on the median and the medcouple (Brys et al. 2004): the left medcouple is minus the medcouple of the observations below the median, and the right medcouple is the medcouple of the observations above the median. The left and right medcouples are robust to outliers and have a breakdown value of 25%. Specifically, the left medcouple (LMC) measures the skewness in the lower tail of the distribution, while the right medcouple (RMC) measures the skewness in the upper tail.

The interpretation of LMC and RMC is as follows:

  • At the normal distribution, LMC = RMC = 0.2 (approximately).

  • Larger values indicate heavier tails than the normal distribution, and smaller values lighter tails.

References

  • Brys, G., Hubert, M., and Struyf, A. (2006). Robust measures of tail weight. Computational Statistics & Data Analysis, 50(3):733-759

  • Brys, G., Hubert, M., and Struyf, A. (2004). A robust measure of skewness. Journal of Computational and Graphical Statistics, 13(4):996-1017

Author

Christian L. Goueguel

Examples

data(forageLIBS)
# iron contents (mg/kg): a few samples are far above the others
fe <- forageLIBS$Fe[!is.na(forageLIBS$Fe)]
moments::kurtosis(fe)   # classical
#> [1] 25.01662
medcouple_weight(fe)    # robust, left and right tails
#> # A tibble: 1 × 2
#>      LMC   RMC
#>    <dbl> <dbl>
#> 1 0.0164 0.602