trimean: Tukey's Trimean

View source: R/stats.R

trimeanR Documentation

Tukey's Trimean

Description

Robust centrality measure estimated as the weighted average of the three quartiles: (Q_1 + 2Q_2 + Q_3) / 4, where Q_1, Q_2 and Q_3 are the first, second and third quartiles respectively.

Usage

trimean(x, ...)

## Default S3 method:
trimean(x, ...)

Arguments

x

numeric vector

...

further arguments passed to or from other methods.

Value

trimean (numeric value of length 1).

Methods (by class)

  • trimean(default): Tukey's trimean

References

https://en.wikipedia.org/wiki/Trimean

Examples

stopifnot(trimean(0:100) == mean(0:100))
stopifnot(trimean(0:100) == median(0:100))


litteR documentation built on Aug. 27, 2022, 1:05 a.m.