sem_kde: SEM de-heaping via the real Kernelheaping package

View source: R/baselines.R

sem_kdeR Documentation

SEM de-heaping via the real Kernelheaping package

Description

Wrapper around the stochastic expectation-maximization estimator of Gross and Rendtel (the Kernelheaping package), interpolated to grid. Requires that package; returns NULL if it is not installed.

Usage

sem_kde(y, D, grid, burnin = 5, samples = 10)

Arguments

y

heaped (rounded) sample.

D

grid width.

grid

evaluation grid (equally spaced).

burnin, samples

SEM burn-in and sample counts passed to Kernelheaping::dheaping.

Value

Density values on grid, or NULL if Kernelheaping is absent.

Examples

grid <- seq(-6, 6, length.out = 512)
if (requireNamespace("Kernelheaping", quietly = TRUE))
  f <- sem_kde(0.5 * round(rnorm(800) / 0.5), 0.5, grid)

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