calcGEI: Generalized Entropy Index

Description Usage Arguments Value References See Also Examples

View source: R/InegConc.r

Description

Computes a generalized entropy inequality measure within a vector.

Usage

1
calcGEI(x, w = NULL, alpha = 1)

Arguments

x

Numeric vector with non-negative values (strictly positive when alpha=0 or alpha=1)

w

Numeric vector of sampling weigths (optional)

alpha

Parameter of the generalized entropy index. Theil index (TT) is calculated for alpha=1, the mean log deviation (TL) for alpha=0.

Value

A list of class "ICI" with components:

ineq

a list with components GEI (value of inequality index) and alpha (value of parameter)

nas

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

References

Cowell F.A. (2000) Measurement of Inequality. In Atkinson A.B., Bourguignon F. (Eds.) Handbook of Income Distribution. Amsterdam, Elsevier, Vol. 1, pp. 87-166.

See Also

decompAtkinson

Examples

1
2
3
4
5
data(hhbudgets)

summary(hhbudgets[, "transporte"])
calcGEI(hhbudgets[,"transporte"], alpha=3)
summary(calcGEI(hhbudgets[,"ingreso"], w=hhbudgets[,"factor"]))

Example output

   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
      0    1836    3522    5194    6272  160858 
$ineq
$ineq$index
     GEI 
4.510638 

$ineq$parameter
alpha 
    3 


$nas
$nas$xNA
[1] 0

$nas$wNA
NULL

$nas$totalNA
[1] 0


attr(,"class")
[1] "ICI"
    GEI          alpha        
0.46204        1.00000        

IC2 documentation built on May 1, 2019, 7:49 p.m.