powered by
Discrete optimal kernel
discrete_optimal(x, z, h, k)
Returns the value of the associated kernel function according to the target x and the bandwidth h.
the target point at which the density is calculated
the vector of observations
the bandwidth (or smoothing parameter), which should match the condition (3 / 5) * (1 - 1 / k)) < h < 1
the integer (positive) parameter that defined the support of the kernel function
discrete_optimal(x = 25, z = 1:50, h = 0.9, k = 20)
Run the code above in your browser using DataLab