iodensity {iosmooth} | R Documentation |
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 |
bw |
|
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 |
The points at which the density should be calculated. If missing, the function defaults to the range of |
Value
A list of length 2
x |
The x values at which the density is estimated ( |
y |
The estimated density at the associated |
Author(s)
Timothy L. McMurry
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
Examples
x <- rnorm(100)
bwplot(x)
h <- bwadap(x)
plot(iodensity(x, bw=h, kernel="Trap", n.points=300), type="l")
rug(x)