This function evaluates an Epanechnikov kernel

k.epan(x)

Arguments

x

a vector of real numbers

Value

A vector of the same length as x where each entry is 0.75 * (1 - x^2) if x < 1 and 0 otherwise.

Details

This function evaluates an Epanechnikov kernel

Author

Matias Salibian-Barrera, matias@stat.ubc.ca, Alejandra Martinez

Examples

x <- seq(-2, 2, length=10) k.epan(x)
#> [1] 0.0000000 0.0000000 0.0000000 0.4166667 0.7129630 0.7129630 0.4166667 #> [8] 0.0000000 0.0000000 0.0000000