superpose_kde: Superposition de-heaping estimator

View source: R/adheaping.R

superpose_kdeR Documentation

Superposition de-heaping estimator

Description

Smooth Bayesian-information-criterion Gaussian-mixture base (broad components) plus a band-limited de-heaped residual on the leftover mass; the base carries the non-identifiable band beyond pi/D.

Usage

superpose_kde(y, D, grid, seed = 20260627)

Arguments

y

heaped (rounded) sample.

D

grid width.

grid

evaluation grid (equally spaced).

seed

random seed for the jitter dequantization.

Value

Density values on grid.

Examples

grid <- seq(-6, 6, length.out = 1024)
x <- ifelse(runif(2000) < 0.5, rnorm(2000, -1.2, 0.5), rnorm(2000, 1.2, 0.5))
f <- superpose_kde(1.0 * round(x / 1.0), 1.0, grid)

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