Gini_CTR_BS: The Gini coefficient adjusted for negative attributes (Chen,...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/Gini_CTR_BS.R

Description

computes the Gini coefficient adjusted for negative (even weighted) data.

Usage

1

Arguments

y

a vector of attributes containing even negative elements

w

a vector containing the weights associated with the elements of the attribute vector

Details

Gini_CTR_BS(y,w) is the Gini coefficient for negative data proposed by Chen, Tsaur and Rhai (1982) and subsequenty improved by Berebbi and Silber (1985). It is based on a normalization factor adding the part of the concentration area lying below the x-axis and provides a value always included into the close range [0,1].

Value

the value of the Gini coefficient adjusted for negative attributes.

Note

If the vector w contains unitary elements, compute Gini_CTR_BS as Gini_CTR_BS(y).

Author(s)

Emanuela Raffinetti, Fabio Aimar

References

C.N. Chen, T.W. Tsaur, T.S. Rhai (1982), The Gini coefficient and negative income, Oxford Economic Papers 34, 473–478

Z.M. Berrebi, J. Silber (1985), The Gini coefficient and negative income: a comment, Oxford Economic Papers 37, 525–526

See Also

ineq, IC2

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# generate the vector of attributes with even negative elements
y<-c(-7,-15,11,-10,2,4,40)
# generate the vector of weights
w<-c(2.5,1.1,3.6,4.4,0.8,2.7,1.9)
# compute the Gini coefficient adjusted for negative values
Gini_CTR_BS(y,w)

data(BI2012)
# define the vector of weights
w<-BI2012$weight 

# select the vector of incomes (e.g., the incomes from transfers YTA)
y<-BI2012$YTA
# compute the Gini coefficient adjusted for negative values
Gini_CTR_BS(y,w)

# select the vector of incomes (e.g., the incomes from financial capital gain YCF)
y<-BI2012$YCF
# compute the Gini coefficient adjusted for negative values
Gini_CTR_BS(y,w)

Example output

$GINI_CTR_BS
[1] 0.9740317

$GINI_CTR_BS
[1] 0.9910092

$GINI_CTR_BS
[1] 0.9846815

GiniWegNeg documentation built on May 2, 2019, 6:10 a.m.