Learn R Programming

wINEQ (version 1.2.1)

Leti: Leti index

Description

Computes Leti inequality measure of a given variable taking into account weights.

Usage

Leti(X, W = rep(1, length(X)), norm = T)

Value

The value of Leti coefficient.

Arguments

X

is a data vector (ordered factor or numeric)

W

is a vector of weights

norm

(logical). If TRUE (default) then Leti index is divided by a maximum possible value which is \((k-1)/2\) where \(k\) in a number of categories.

Details

Let \(n_{i}\) be the number of individuals in category \(i\) and let \(N\) be the total sample size. Cumulative distribution is given by \(F_{i} = \frac{\sum_{j=1}^{i} n_{j}}{N}\). Leti index is defined as: $$L =2 \sum_{i=1}^{k-1} F_{i}(1-F_{i})$$

References

Leti G.: (1983). Statistica descrittiva, il Mulino, Bologna. ISBN: 8-8150-0278-2

Examples

Run this code
# Compare weighted and unweighted result
X=1:10
W=1:10
Leti(X)
Leti(X,W)

data(Tourism)
#Leti index for Total expenditure with sample weights
X=Tourism$Total_expenditure
W=Tourism$Sample_weight
Leti(X,W)


Run the code above in your browser using DataLab