Generate PDFs and CDFs from Binned Data
Estimate the Gini coefficient
Recursive subdivision PDF and CDF fitted to binned data
Estimate percentiles from splinebins
Random sample from splinebins distribution
Simulate data to mimic county_bins and county_true
Optimized spline PDF and CDF fitted to binned data
Estimate various statistics
Step function PDF and CDF fitted to binned data
Estimate the Theil index
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.