Calculates the value of the Epanechnikov kernel function for any vector.

kernel(v)

Arguments

v

A vector of real numbers.

Value

A vector of the calculated kernel values for the input vector.

References

Epanechnikov, V. A. (1969). Non-parametric estimation of a multivariate probability density. Theory of Probability and its Applications, 14(1), 153-6.

Examples

x = runif(10) kernel(x)
#> [1] 0.7451096 0.2279163 0.4793148 0.7314641 0.7499589 0.5868578 0.5641633 #> [8] 0.6870262 0.3471630 0.3024079