gini.coefficient: Diversity as disparity: Gini's Coefficient

Description Usage Arguments Details Value Author(s) References Examples

Description

This function computes Gini's coefficient for quantifying diversity as disparity.

Usage

1

Arguments

X

A numeric vector with group data.

min

The minimum value for the random variable.

max

The maximum value for the random variable.

Details

gini.coefficient computes Gini's Coefficient for a group according the following formula:

G = {Δ \over {2\bar x}} = {{∑\limits_{i = 1}^n {∑\limits_{j = i + 1}^n {≤ft| {x_i - x_j } \right|} } } \over {n^2 \bar x}} .

It also provides maximum values for Gini's Coefficient.

Value

The function returns a list of class gini with following components:

call

Function call.

data

Original data vector.

min

Minimum value for the random variable.

max

Maximum value for the random variable.

gini

Gini's Coefficient.

gini.max

Maximum value of Gini's Coefficient.

Author(s)

Antonio Solanas, Rejina M. Selvam, Jose Navarro and David Leiva.

References

Solanas, A., Selvam, R. M., Navarro, J., & Leiva, D. (2010). On the measurement of diversity in organizations. Unpublished manuscript.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
ex.1 <- c(30,rep(60,3))
gini.coefficient(ex.1,30,60)  

ex.2 <- c(60,rep(30,3))
gini.coefficient(ex.2,30,60)

ex.3 <- c(rep(30,2),rep(60,2))
gini.coefficient(ex.3,30,60)

# Gini coefficient does not behave as disparity index when minimum value is greater than 0. #
# Then, a translation of scale is suitable for solving this problem. #
ex.4 <- ex.1 - 30
gini.coefficient(ex.4,0,30) 

ex.5 <- ex.2 - 30
gini.coefficient(ex.5,0,30) 

ex.6 <- ex.3 - 30
gini.coefficient(ex.6,0,30)

DLEIVA/diversity documentation built on May 10, 2019, 1:14 a.m.