heap_fraction: Estimate the heaped fraction from the comb tooth height

View source: R/adheaping.R

heap_fractionR Documentation

Estimate the heaped fraction from the comb tooth height

Description

Under partial heaping the leading tooth has height about p^2 over the residue floor, so phat = sqrt(S_peak - floor).

Usage

heap_fraction(y, D, grid)

Arguments

y

heaped (rounded) sample.

D

grid width.

grid

evaluation grid (equally spaced).

Value

The estimated heaped fraction in [0, 1].

Examples

grid <- seq(-6, 6, length.out = 2048)
x <- rnorm(4000); heaped <- runif(4000) < 0.4
y <- x; y[heaped] <- round(x[heaped])
heap_fraction(y, 1.0, grid)

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