R: The Gini coefficient adjusted for negative attributes...
Gini_RSV
R Documentation
The Gini coefficient adjusted for negative attributes (Raffinetti, Siletti and Vernizzi, 2015)
Description
computes the Gini coefficient adjusted for negative (even weighted) data.
Usage
Gini_RSV(y,w)
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_RSV(y,w) is the Gini coefficient for negative income data proposed by Raffinetti, Siletti and Vernizzi (2015) and based on a new
definition of the "polarized" scenario, where the total negative attribute amount is assigned to one unit, the total positive amount to another unit, while all
the other units have a zero amount of attribute. It 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_RSV as Gini_RSV(y).
Author(s)
Emanuela Raffinetti, Fabio Aimar
References
E. Raffinetti, E. Siletti, A. Vernizzi (2014), Inequality measures and the issue of negative income. Italian Statistical Society Conference (SIS), Book of Short Papers: "SIS2014. 47th Scientific Meeting of the Italian Statistical Society", CUEC (Cooperativa Universitaria Editrice Cagliaritana), 11-13 June 2014
E. Raffinetti, E. Siletti, A. Vernizzi (2015), On the Gini coefficient normalization when incomes with negative values are considered, Statistical Methods & Applications, 24(3), 507-521
E. Raffinetti, E. Siletti, A. Vernizzi (2016), Analyzing the effects of negative and non-negative values on income inequality. Evidence from the Survey of Household Income and
Wealth of the Bank of Italy (2012), Social Indicators Research (published on line http://link.springer.com/article/10.1007
See Also
ineq,IC2
Examples
# 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_RSV(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_RSV(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_RSV(y,w)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(GiniWegNeg)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/GiniWegNeg/Gini_RSV.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Gini_RSV
> ### Title: The Gini coefficient adjusted for negative attributes
> ### (Raffinetti, Siletti and Vernizzi, 2015)
> ### Aliases: Gini_RSV
>
> ### ** Examples
>
> # 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_RSV(y,w)
$GINI_RSV
[1] 0.6694118
>
> 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_RSV(y,w)
$GINI_RSV
[1] 0.9520164
>
> # 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_RSV(y,w)
$GINI_RSV
[1] 0.8999951
>
>
>
>
>
> dev.off()
null device
1
>