heitjan_mi: Heitjan-Rubin multiple-imputation de-heaping (faithful base-R...

View source: R/baselines.R

heitjan_miR Documentation

Heitjan-Rubin multiple-imputation de-heaping (faithful base-R replica).

Description

A faithful replica of the multiple-imputation approach of Heitjan and Rubin (1990) for coarse/heaped data: a pilot density is fit to jitter-dequantized values; then, in each of M independent imputations, every heaped value is imputed within its rounding cell in proportion to the pilot density and a kernel density estimate is formed on the imputed data; the imputations are averaged. Unlike the stochastic-EM chain of Kernelheaping, the draws are independent multiple imputations, in the Heitjan-Rubin style. No standalone Heitjan KDE package exists, so this replica stands in for it; the manuscript states as much.

Usage

heitjan_mi(y, D, grid, M = 10, seed = 20260627)

Arguments

y

heaped (rounded) sample.

D

grid width.

grid

evaluation grid (equally spaced).

M

number of imputations (default 10).

seed

random seed.

Value

Density values on grid.

References

Heitjan, D. F. and Rubin, D. B. (1990) Inference from coarse data via multiple imputation with application to age heaping. JASA 85, 304-314.

Examples

grid <- seq(-6, 6, length.out = 512)
f <- heitjan_mi(1.0 * round(rnorm(1000)), 1.0, grid, M = 4)

adheaping documentation built on Sept. 18, 2026, 1:06 a.m.