tukey.mean: Averaging via Tukey's Biweight

View source: R/mathTools.R

tukey.meanR Documentation

Averaging via Tukey's Biweight

Description

A family of robust estimators based on Tukey's biweight

Usage

tukey.biweight(x, c = 5, e = 1e-04, na.rm = FALSE)
tukey.mean(x, c = 5, e = 1e-04, na.rm = FALSE)
tukey.logmean(x, c = 5, e = 1e-04, na.rm = FALSE)

Arguments

x

numeric vector of values to find the 'average' of

c, e

arguments to the underlying biweight algorithm

Details

Tukey's Biweight calculates a set of weight terms for the elements of x, based on a function of the each element of x distance from the median of x. Those weight are then used in the calculation of the average of x, by either mean or log-average (geometric mean).

Value

For 'biweight', a numeric vector of length length(x), of the scalar weights for each element of x.

Otherwise, a numeric scalar that is the 'average' of x.


robertdouglasmorrison/DuffyTools documentation built on Sept. 13, 2024, 4:51 p.m.