Last data update: 2014.03.03

R: Concentration Index
calcSConcR Documentation

Concentration Index

Description

Computes the concentration index for a vector, ranked by another vector.

Usage

calcSConc(x, y, w = NULL, param = 2)

Arguments

x

Numeric vector with non-negative values.

y

Numeric vector used for the ranking of vector x.

w

Numeric vector of sampling weigths (optional).

param

Parameter specifying the concentration index (must be strictly positive).

Value

A list of class "ICI" with components:

ineq

a list with components SConc (value of concentration index) and param (value of parameter).

nas

a list with NA counts, including components xNA, yNA, wNA and totalNA.

References

Kakwani N.C. (1977) Measurement of Tax Progressivity: An International Comparison. The Economic Journal, 87(345), pp. 71-80.

O'Donnell O., van Doorslaer E., Wagstaff A., Lindelow M. (2008) Analyzing Health Equity Using Household Survey Data. World Bank, 220 p.

See Also

curveConcent

Examples

data(hhbudgets)

calcSConc(hhbudgets[, "transporte"], hhbudgets[,"ingreso"], param=0.5)
summary(hhbudgets[,"mantenimiento"])
calcSConc(hhbudgets[,"mantenimiento"], hhbudgets[,"ingreso"], w=hhbudgets[,"factor"])

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(IC2)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/IC2/calcSConc.Rd_%03d_medium.png", width=480, height=480)
> ### Name: calcSConc
> ### Title: Concentration Index
> ### Aliases: calcSConc
> 
> ### ** Examples
> 
> data(hhbudgets)
> 
> calcSConc(hhbudgets[, "transporte"], hhbudgets[,"ingreso"], param=0.5)
$ineq
$ineq$index
     SConc 
-0.6670986 

$ineq$parameter
param 
  0.5 


$nas
$nas$xNA
[1] 0

$nas$yNA
[1] 0

$nas$wNA
NULL

$nas$totalNA
[1] 0


attr(,"class")
[1] "ICI"
> summary(hhbudgets[,"mantenimiento"])
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
      0       0       0    1374    2103   32990 
> calcSConc(hhbudgets[,"mantenimiento"], hhbudgets[,"ingreso"], w=hhbudgets[,"factor"])
$ineq
$ineq$index
    SConc 
0.5260946 

$ineq$parameter
param 
    2 


$nas
$nas$xNA
[1] 0

$nas$yNA
[1] 0

$nas$wNA
[1] 0

$nas$totalNA
[1] 0


attr(,"class")
[1] "ICI"
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>