MyNixOS website logo
Description

Tools for Deriving Income Inequality Estimates from Grouped Income Data.

Provides two methods of estimating income inequality statistics from binned income data, such as the income data provided in the Census. These methods use different interpolation techniques to infer the distribution of incomes within income bins. One method is an implementation of Jargowsky and Wheeler's mean-constrained integration over brackets (MCIB). The other method is based on a new technique, Lorenz interpolation, which estimates income inequality by constructing an interpolated Lorenz curve based on the binned income data. These methods can be used to estimate three income inequality measures: the Gini (the default measure returned), the Theil, and the Atkinson's index. Jargowsky and Wheeler (2018) <doi:10.1177/0081175018782579>.

lorenz

Travis buildstatus

Overview

The U.S. Census publishes income data as counts in income brackets. Estimating income inequality from grouped income data requires that certain assumptions be made about the distribution of incomes within these brackets. The lorenz package provides two methods for computing income inequality statistics using grouped income data.

The package consists of main functions - lorenz_interp and mcib. lorenz_interp, which stands for Lorenz interpolation, is based on a new method I developed that estimates income inequality using an interpolated Lorenz curve. mcib, which stands for mean-constrained integration over brackets, estimates income inequality using a technique described in a 2018 paper from Jargowsky and Wheeler.

Installation

You can currently install the development version of lorenz from Github.

# install.packages("devtools")
devtools::install_github("datadiarist/lorenz")

Usage

The main function of the lorenz package is lorenz_interp. This function requires three arguments - a vector giving the number of people/households in each bracket, a vector giving the bracket boundaries, and a number specifying the income distribution mean. Following previous research, the distribution described by the income boundaries is assumed to be bounded at the bottom and unbounded at the top. For instance, the boundaries in the example below specify a distribution whose bottom income bracket is $0-10000 and whose top income bracket is $200000+.

library(lorenz)

frequencies <- c(45, 31, 33, 27, 43, 40, 51, 50, 63, 97, 121, 132, 64, 54, 32, 12)
boundaries <- c(0, 10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000, 60000, 75000,
100000, 125000, 150000, 200000)
mean_income <- 66500

# The Gini coefficient is given by default 
lorenz_interp(frequencies, boundaries, mean_income)
#> [1] 0.3707927

# Use the stat parameter to specify the inequality measure (gini, theil, or atkinson)
lorenz_interp(frequencies, boundaries, mean_income, stat = 'theil')
#> [1] 0.238408

lorenz also provides an implementation of mean-constrained integration over brackets with the mcib function. This function also requires three parameters - frequencies, boundaries, and a distribution mean.

# MCIB Gini
mcib(frequencies, boundaries, mean_income)
#> [1] 0.3584898

# MCIB Theil
mcib(frequencies, boundaries, mean_income, stat = 'theil')
#> [1] 0.2342135

Help

If you encounter a bug, please file an issue with a reproducible example on GitHub.

Metadata

Version

0.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows