Learn R Programming

binequality (version 1.0.4)

Methods for Analyzing Binned Income Data

Description

Methods for model selection, model averaging, and calculating metrics, such as the Gini, Theil, Mean Log Deviation, etc, on binned income data where the topmost bin is right-censored. We provide both a non-parametric method, termed the bounded midpoint estimator (BME), which assigns cases to their bin midpoints; except for the censored bins, where cases are assigned to an income estimated by fitting a Pareto distribution. Because the usual Pareto estimate can be inaccurate or undefined, especially in small samples, we implement a bounded Pareto estimate that yields much better results. We also provide a parametric approach, which fits distributions from the generalized beta (GB) family. Because some GB distributions can have poor fit or undefined estimates, we fit 10 GB-family distributions and use multimodel inference to obtain definite estimates from the best-fitting distributions. We also provide binned income data from all United States of America school districts, counties, and states.

Copy Link

Version

Install

install.packages('binequality')

Monthly Downloads

236

Version

1.0.4

License

GPL (>= 3.0)

Maintainer

Samuel Scarpino

Last Published

November 5th, 2018

Functions in binequality (1.0.4)

LRT

A function to perform likelihood ratio tests
MLD

A function to calculate the MLD
makeFitComb

A function to transform a list into a dataframe
makeInt

A function to create a survival object from bin counts.
getMids

A function to calculate the bin midpoints.
getQuantilesParams

A function to extract the quantiles and parameters
school_district_bins

A data set containing the school district data.
SDL

A function to calculate the SDL
binequality-package

Methods for Analyzing Binned Income Data
state_bins

A data set containing the binned state data.
paramFilt

A function to filter models based on estimated parameters
run_GB_family

A function to fit a parametric distributions to binned data.
giniCoef

Calculates the Gini coefficient from quantiles
mAvg

A simple function to perfom model averaging using pre-calculated weights.
midStats

A function to calculate statistics using bin midpoints
modelAvg

A function to calculate model averages
county_bins

A data set containing binned income for US counties
fitFunc

A function to fit a parametric distribution to binned data.
makeIntWeight

A function to create a survival object from bin counts and normalized bin weights.
makeWeightsAIC

A function to calculate AIC weights
theilInd

A function to calculate the Theil