Learn R Programming

iosmooth (version 0.94)

iodensity: Kernel density estimation with infinite order kernels

Description

Calculates the standard kernel density estimate using infinite order flat-top kernels. These estimators have been shown to automatically achieve optimal rates of covergence across a wide range of scenarios.

Usage

iodensity(x, bw, kernel = c("Trap", "Rect", "SupSm"), n.points = 100, x.points)

Arguments

x
Univariate data x.
bw
The kernel bandwidth. See bwplot and bwadap.
kernel
Three flat-top kernels are implemented, described by the shape of their Fourier transforms. "Trap" is trapezoid shaped and is the default. The rectangular kernel is not recommended and is here for comparison only. SupSm is infinitely differentiable in the Fourier domain; its inverse Fourier transform is estimated numerically, and will be slower.
n.points
The number of points at which the density estimate will be calculated if x.points is not specified.
x.points
The points at which the density should be calculated. If missing, the function defaults to the range of x +/- 5%.

Value

A list of length 2 A list of length 2

References

Politis, D. N. (2001). On nonparametric function estimation with infinite-order flat-top kernels, in Probability and Statistical Models with applications, Ch. Charalambides et al. (Eds.), Chapman and Hall/CRC, Boca Raton, 469-483.

McMurry, T. L., & Politis, D. N. (2004). Nonparametric regression with infinite order flat-top kernels. Journal of Nonparametric Statistics, 16(3-4), 549-562.

See Also

bwadap, bwadap.numeric

Examples

Run this code
x <- rnorm(100)
bwplot(x)
h <- bwadap(x)
plot(iodensity(x, bw=h, kernel="Trap", n.points=300), type="l")
rug(x)

Run the code above in your browser using DataLab