Learn R Programming

lmomco (version 1.7.3)

gini.mean.diff: Gini Mean Difference Statistic

Description

The Gini mean difference statistic $\mathcal{G}$ is a robust estimator of distribution scale and is closely related to the second L-moment $\lambda_2 = \mathcal{G}/2$.

$$\mathcal{G} = \frac{2}{n(n-1)}\sum_{i=1}^n (2i - n - 1) X_{i:n}$$

where $X_{i:n}$ are the order statistics.

Usage

gini.mean.diff(x)

Arguments

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

Value

  • An R list is returned.
  • giniThe gini mean difference $\mathcal{G}$
  • L2The L-scale (second L-moment) via $0.5*\mathcal{G}$
  • sourceAn attribute identifying the computational source of the Gini's Mean Difference: gini.mean.diff.

encoding

UTF-8

References

Hosking, J.R.M., 1990, L-moments---Analysis and estimation of distributions using linear combinations of order statistics: Journal of the Royal Statistical Society, Series B, vol. 52, p. 105--124.

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

See Also

lmoms

Examples

Run this code
fake.dat <- c(123,34,4,654,37,78)
gini <- gini.mean.diff(fake.dat)
lmr <- lmoms(fake.dat)
str(gini)
print(abs(gini$L2 - lmr$lambdas[2]))

Run the code above in your browser using DataLab