iodensity: Kernel density estimation with infinite order kernels

Description Usage Arguments Value Author(s) References See Also Examples

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

1
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

x

The x values at which the density is estimated (x.points if specified).

y

The estimated density at the associated x values.

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

bwadap, bwadap.numeric

Examples

1
2
3
4
5
x <- rnorm(100)
bwplot(x)
h <- bwadap(x)
plot(iodensity(x, bw=h, kernel="Trap", n.points=300), type="l")
rug(x)

iosmooth documentation built on May 1, 2019, 10:30 p.m.

Related to iodensity in iosmooth...