kedd-data: Samples from Marron and Wand (1992) Normal Mixture Densities

kedd-dataR Documentation

Samples from Marron and Wand (1992) Normal Mixture Densities

Description

Five samples of size 200 drawn from normal mixtures of Marron and Wand (1992), classical test cases for density (derivative) estimation and bandwidth selection. Writing N(\mu, \sigma^2) for a normal density:

kurtotic

kurtotic unimodal density (#4): \frac23 N(0,1) + \frac13 N(0, (1/10)^2).

outlier

outlier density (#5): \frac1{10} N(0,1) + \frac9{10} N(0, (1/10)^2).

bimodal

separated bimodal density (#7): \frac12 N(-\frac32, (\frac12)^2) + \frac12 N(\frac32, (\frac12)^2).

trimodal

trimodal density (#9): \frac9{20} N(-\frac65, (\frac35)^2) + \frac9{20} N(\frac65, (\frac35)^2) + \frac1{10} N(0, (\frac14)^2).

claw

claw density (#10): \frac12 N(0,1) + \sum_{l=0}^{4} \frac1{10} N(\frac l2 - 1, (\frac1{10})^2).

Usage

bimodal
claw
kurtotic
outlier
trimodal

Format

Each object is a numeric vector of length 200.

Details

The datasets are loaded lazily: claw is available as soon as the package is attached (data(claw) also works). The true densities are known, so the estimates \hat f_h^{(r)} and the selected bandwidths can be compared with the truth.

Source

Simulated samples, as in previous versions of kedd.

References

Marron, J. S. and Wand, M. P. (1992). Exact mean integrated squared error. The Annals of Statistics, 20, 712–736.

See Also

dkde, h.ucv, kedd-package.

Examples

## the five samples
sapply(list(kurtotic = kurtotic, outlier = outlier, bimodal = bimodal,
            trimodal = trimodal, claw = claw), summary)

## claw density: estimate with an MCV bandwidth and the true density
bw <- h.mcv(claw)
f_claw <- function(x) 0.5 * dnorm(x) +
  rowSums(sapply(0:4, function(l) 0.1 * dnorm(x, l / 2 - 1, 0.1)))
p <- plot(dkde(data = claw, h = bw@h))
p + ggplot2::stat_function(fun = f_claw, linetype = "dashed")

## first derivative of the bimodal sample
plot(dkde(data = bimodal, h = h.ucv(bimodal, deriv.order = 1)@h, deriv.order = 1))

kedd documentation built on Nov. 12, 2026, 5:10 p.m.