| deheap_kde | R Documentation |
Rounding to grid D is convolution of the density with a width-D box followed
by lattice sampling; in the identifiable band |w| < pi/D the empirical characteristic
function is divided by sinc(wD/2) (de-Sheppard) and Wiener-tapered against the
sampling floor 1/n, amplified by the deconvolution. No bandwidth is chosen by hand.
deheap_kde(y, D, grid)
y |
heaped (rounded) sample. |
D |
grid width. |
grid |
evaluation grid (equally spaced). |
Density values on grid.
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 <- deheap_kde(0.5 * round(x / 0.5), 0.5, grid)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.