Learn R Programming

binsmooth (version 0.2.2)

Generate PDFs and CDFs from Binned Data

Description

Provides several methods for generating density functions based on binned data. Methods include step function, recursive subdivision, and optimized spline. Data are assumed to be nonnegative, the top bin is assumed to have no upper bound, but the bin widths need be equal. All PDF smoothing methods maintain the areas specified by the binned data. (Equivalently, all CDF smoothing methods interpolate the points specified by the binned data.) In practice, an estimate for the mean of the distribution should be supplied as an optional argument. Doing so greatly improves the reliability of statistics computed from the smoothed density functions. Includes methods for estimating the Gini coefficient, the Theil index, percentiles, and random deviates from a smoothed distribution. Among the three methods, the optimized spline (splinebins) is recommended for most purposes. The percentile and random-draw methods should be regarded as experimental, and these methods only support splinebins.

Copy Link

Version

Install

install.packages('binsmooth')

Monthly Downloads

199

Version

0.2.2

License

MIT + file LICENSE

Maintainer

Dave Hunter

Last Published

March 11th, 2020

Functions in binsmooth (0.2.2)

rsubbins

Recursive subdivision PDF and CDF fitted to binned data
theil

Estimate the Theil index
simcounty

county_bins

ACS County Income Data, 2006-2010
county_true

ACS County Income Statistics, 2006-2010
splinebins

Optimized spline PDF and CDF fitted to binned data
gini

Estimate the Gini coefficient
sb_sample

Random sample from splinebins distribution
sb_percentiles

Estimate percentiles from splinebins
stats_from_distribution

Estimate various statistics
stepbins

Step function PDF and CDF fitted to binned data