Correction of Heaping on Individual Level

Provides methods for correcting heaping (digit preference) in survey data at the individual record level. Age heaping, where respondents disproportionately report ages ending in 0 or 5, is a common phenomenon that can distort demographic analyses. Unlike traditional smoothing methods that only correct aggregated statistics, this package corrects individual values by replacing a calculated proportion of heaped observations with draws from fitted truncated distributions (log-normal, normal, or uniform). Supports 5-year and 10-year heaping patterns, single heap correction, survey weights, and optional covariate-conditional (model-based) correction via quantile regression forests or linear models to preserve relationships. A multiple-imputation wrapper repeats the correction to propagate the added uncertainty into downstream inference.


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("heaping")

0.2.0 by Matthias Templ, 3 months ago


https://github.com/matthias-da/heaping


Report a bug at https://github.com/matthias-da/heaping/issues


Browse source code at https://github.com/cran/heaping


Authors: Matthias Templ [aut, cre] (ORCID: , Bernhard Meindl [ctb]


Documentation:   PDF Manual  


GPL (>= 2) license


Imports fitdistrplus, EnvStats, stats

Suggests VIM, ranger, data.table, ggplot2, simPop, testthat, knitr, rmarkdown


See at CRAN