lorenz: The Lorenz Curve

Description Usage Arguments Details Author(s) See Also Examples

Description

Computes the (empirical) ordinary and generalized Lorenz curve of a vector.

Usage

1
2
3
4
Lorenz(x, n = rep(1, length(x)), plot = FALSE, ...)

## Default S3 method:
Lorenz(x, n = rep(1, length(x)), plot = FALSE, ...)

Arguments

x

A vector of non-negative values.

n

A vector of frequencies of the same length as x.

plot

A logical. If TRUE the Lorenz curve will be plotted.

...

Additional arguements (currently ignored)

Details

The Gini coefficient ranges from a minimum value of zero, when all individuals are equal, to a theoretical maximum of one in an infinite population in which every individual except one has a size of zero. It has been shown that the sample Gini coefficients originally defined need to be multiplied by n/(n-1) in order to become unbiased estimators for the population coefficients.

Author(s)

Daniel Marcelino, dmarcelino@live.com.

See Also

Gini, Simpson.

Examples

1
2
3
4
5
6
7
8
# generate a vector (of incomes)
x <- c(778, 815, 857, 888, 925, 930, 965, 990, 1012)
# compute Lorenz values
Lorenz(x)
# generate some weights:
wgt <- runif(n=length(x))
# compute the lorenz with especific weights
Lorenz(x, wgt)

danielmarcelino/SciencesPo documentation built on Oct. 20, 2019, 1:15 a.m.