Learn R Programming

lorenz (version 0.1.0)

lorenz_interp: Computes income inequality statistics derived with Lorenz interpolation.

Description

Computes income inequality statistics derived with Lorenz interpolation.

Usage

lorenz_interp(freqs, bounds, mean, slope_parm = 0.9, stat = "gini", eta = NA)

Arguments

freqs

A vector of counts in income brackets.

bounds

A vector of income bracket boundaries.

mean

Grand mean of income distribution.

slope_parm

(default = .9) Slope parameter that influences the shape of the function fitted to the Lorenz curve.

stat

(optional) Return income statistic instead of sample incomes.

eta

(optional) Parameter for Atkinson's coefficient.

Value

Income inequality statistics derived with Lorenz interpolation.

Examples

Run this code
# NOT RUN {
ex_freqs <- c(45, 31, 33, 27, 43, 40, 51, 50, 63, 97, 121, 132, 64, 54, 32, 12)
ex_bounds <- c(0, 10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000, 60000, 75000,
100000, 125000, 150000, 200000)
ex_mean <- 66500
lorenz_interp(ex_freqs, ex_bounds, ex_mean)
# }

Run the code above in your browser using DataLab