sen.mean: Sen Weighted Mean Statistic

sen.meanR Documentation

Sen Weighted Mean Statistic

Description

The Sen weighted mean statistic \mathcal{S}_{n,k} is a robust estimator of the mean of a distribution

\mathcal{S}_{n,k} = {n \choose 2k+1}^{-1} \sum_{i=1}^n {i - 1 \choose k} {n - i \choose k } x_{i:n}\mbox{,}

where x_{i:n} are the sample order statistics and k is a weighting or trimming parameter. If k = 2, then the \mathcal{S}_{n,2} is the first symmetrical TL-moment (trim = 1). Note that \mathcal{S}_{n,0} = \mu = \overline{X}_n or the arithmetic mean and \mathcal{S}_{n,k} is the sample median if either n is even and k = (n/2) - 1 or n is odd and k = (n-1)/2.

Usage

sen.mean(x, k=0)

Arguments

x

A vector of data values that will be reduced to non-missing values.

k

A weighting or trimming parameter 0 < k < (n-1)/2.

Value

An R list is returned.

sen

The sen mean \mathcal{S}_{n,k}.

source

An attribute identifying the computational source: “sen.mean”.

Author(s)

W.H. Asquith

References

Jurečková, J., and Picek, J., 2006, Robust statistical methods with R: Boca Raton, Fla., Chapman and Hall/CRC, ISBN 1–58488–454–1, 197 p.

Sen, P.K., 1964, On some properties of the rank-weighted means: Journal Indian Society of Agricultural Statistics: v. 16, pp. 51–61.

See Also

TLmoms, gini.mean.diff

Examples

fake.dat <- c(123, 34, 4, 654, 37, 78)
sen.mean(fake.dat); mean(fake.dat) # These should be the same values

sen.mean(fake.dat, k=(length(fake.dat)/2) - 1); median(fake.dat)
# Again, same values

# Finally, the sen.mean() is like a symmetrically trimmed TL-moment
# Let us demonstrate by computed a two sample trimming for each side
# for a Normal distribution having a mean of 100.
fake.dat <- rnorm(20, mean=100)
lmr <- TLmoms(fake.dat, trim=2)
sen <- sen.mean(fake.dat, k=2)

print(abs(lmr$lambdas[1] - sen$sen)) # zero is returned

wasquith/lmomco documentation built on Nov. 13, 2024, 4:53 p.m.