Last data update: 2014.03.03

R: The pseudo-Gini (concentration) coefficient adjusted for...
PGini_RSVR Documentation

The pseudo-Gini (concentration) coefficient adjusted for negative attributes (Raffinetti, Siletti and Vernizzi, 2016)

Description

computes the pseudo-Gini (concentration) coefficient adjusted for negative data.

Usage

PGini_RSV(y,s,w)

Arguments

y

a vector of attributes usually corresponding to the vector of total incomes

s

a vector of attributes containing even negative elements, usually corresponding to one of the income sources composing the total income

w

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

Details

PGini_RSV(y,s,w) is the pseudo-Gini (concentration) coefficient for negative income data proposed by Raffinetti, Siletti and Vernizzi (2016) and based on the Raffinetti, Siletti and Vernizzi (2015) normalization. It provides a value always included into the close range [-1,+1]. The pseudo-Gini (concentration) coefficient is built by ordering the values of vector s according to the values of vector y sorted in non-decreasing order.

Value

the value of the pseudo-Gini (concentration) coefficient adjusted for negative attributes.

Note

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

Author(s)

Emanuela Raffinetti, Fabio Aimar

References

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

IC2

Examples

# generate the vector of total incomes 
y<-c(-7,-15,11,-10,2,4,40)
# generate the vector of one of the income sources composing the total income
s<-c(-3,6,-5,9,5,-1,-15)
# generate the vector of weights
w<-c(2.5,1.1,3.6,4.4,0.8,2.7,1.9)
# compute the pseudo-Gini (concentration) coefficient 
PGini_RSV(y,s,w)

data(BI2012)
# define the vector of weights
w<-BI2012$weight 
# select the vector of the total net income Y
y<-BI2012$Y

# select the vector of the income source (e.g., the incomes from transfers YTA)
s<-BI2012$YTA
# compute the pseudo-Gini (concentration) coefficient  
PGini_RSV(y,s,w)

# select the vector of the income source (e.g., the incomes from financial capital gain YCF)
s<-BI2012$YCF
# compute the pseudo-Gini (concentration) coefficient 
PGini_RSV(y,s,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/PGini_RSV.Rd_%03d_medium.png", width=480, height=480)
> ### Name: PGini_RSV
> ### Title: The pseudo-Gini (concentration) coefficient adjusted for
> ###   negative attributes (Raffinetti, Siletti and Vernizzi, 2016)
> ### Aliases: PGini_RSV
> 
> ### ** Examples
> 
> # generate the vector of total incomes 
> y<-c(-7,-15,11,-10,2,4,40)
> # generate the vector of one of the income sources composing the total income
> s<-c(-3,6,-5,9,5,-1,-15)
> # generate the vector of weights
> w<-c(2.5,1.1,3.6,4.4,0.8,2.7,1.9)
> # compute the pseudo-Gini (concentration) coefficient 
> PGini_RSV(y,s,w)
$PGini_RSV
[1] -0.607159

> 
> data(BI2012)
> # define the vector of weights
> w<-BI2012$weight 
> # select the vector of the total net income Y
> y<-BI2012$Y
> 
> # select the vector of the income source (e.g., the incomes from transfers YTA)
> s<-BI2012$YTA
> # compute the pseudo-Gini (concentration) coefficient  
> PGini_RSV(y,s,w)
$PGini_RSV
[1] -0.2121273

> 
> # select the vector of the income source (e.g., the incomes from financial capital gain YCF)
> s<-BI2012$YCF
> # compute the pseudo-Gini (concentration) coefficient 
> PGini_RSV(y,s,w)
$PGini_RSV
[1] 0.4752403

> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>