tukey.mean: Averaging via Tukey's Biweight

Description Usage Arguments Details Value

View source: R/mathTools.R

Description

A family of robust estimators based on Tukey's biweight

Usage

1
2
3
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 Dec. 7, 2018, 8:02 a.m.