Learn R Programming

IsoplotR (version 0.5)

botev: Compute the optimal kernel bandwidth

Description

Uses the diffusion algorithm of Zdravko Botev (2011) to calculate the bandwidth for kernel density estimation

Usage

botev(x)

Arguments

x
a vector of ordinal data

Value

a scalar value with the optimal bandwidth

References

Botev, Z. I., J. F. Grotowski, and D. P. Kroese. "Kernel density estimation via diffusion." The Annals of Statistics 38.5 (2010): 2916-2957.

Examples

Run this code
data(examples)
samp <- examples$DZ[['N1']]
bw <- botev(samp)
print(bw)

Run the code above in your browser using DataLab