| Library: | stats |
| See also: | plotlorenz |
| Quantlet: | lorenz | |
| Description: | calculates the measures of concentration of Gini and Herfindahl |
| Usage: | lorenz(y) | |
| Input: | ||
| y (must be positive) | n x 1 vector of original data or n x 2 matrix of classified data: first column = class means second column = frequencies. | |
| Output: | ||
| Gini | number in [0,1], Gini coefficient | |
| Herfindahl | number in [0,1], Herfindahl measure of concentration | |
library("stats")
x = normal(200)
x = abs(x)
lorenz(x)
y = 1:5 ~ #(2,6,8,5,2)
lorenz(y)
returns Gini and Herfindahl coefficients
| Library: | stats |
| See also: | plotlorenz |