Discrete Epanechnikov kernel
discrete_epanech(x, z, h)
Returns the value of the associated kernel function according to the target x and the bandwidth h.
# Basic usage of discrete_epanech() to compute a discrete Epanechnikov kernel
discrete_epanech(x = 25, z = 1:50, h = 20)
#> [1] 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.003658537
#> [7] 0.007129456 0.010412758 0.013508443 0.016416510 0.019136961 0.021669794
#> [13] 0.024015009 0.026172608 0.028142589 0.029924953 0.031519700 0.032926829
#> [19] 0.034146341 0.035178236 0.036022514 0.036679174 0.037148218 0.037429644
#> [25] 0.037523452 0.037429644 0.037148218 0.036679174 0.036022514 0.035178236
#> [31] 0.034146341 0.032926829 0.031519700 0.029924953 0.028142589 0.026172608
#> [37] 0.024015009 0.021669794 0.019136961 0.016416510 0.013508443 0.010412758
#> [43] 0.007129456 0.003658537 0.000000000 0.000000000 0.000000000 0.000000000
#> [49] 0.000000000 0.000000000