# Kernel Density Estimation for non-parametric

I'm writing an R function to get the fitted values of the kernel density estimate. For that I use the computational formula of summation of ({n-1 h-1 K{(x - Xi)/h}}?) $$\hat{f}(x) = \frac1{n h}\sum_{i=1}^n K\left(\frac{x-X_i}{h}\right)$$ where $$n$$ is the number of observations and $$h$$ is the bandwidth. Here $$K$$ is supposed to be the kernel function, but I don't find a clear formula to plug-in for $$K$$ in this formula.

I'm known that there are various kernel functions, but I clearly couldn't find the list of kernel functions that exist. (Epanechnikov kernel, cosine, Gaussian, Parzen, rectangular, and triangle kernels are among).

Could someone kindly provide me with a/some straightforward formulas to obtain K?

I used the following article:

• Well, you really need to learn $\LaTeX$ (and its version implemented here in Mathjax, see math.meta.stackexchange.com/questions/5020/…. As for me doing it, lack of parenthesis makes the intention unclear to me, so will not try. At least edit to make the meaning of the formals clear! Commented Oct 4, 2019 at 9:34
• I guessed that you want formula 2.2a from the linked paper. Can you verify? Also, now push the edit button, look at the $\LaTeX$, and learn! Commented Oct 5, 2019 at 16:16
• Here is a list of common kernel functions Commented Oct 5, 2019 at 17:14

$$K$$ is just something you pick as part of the model. The standard choices are indeed Gaussian, Epanechnikov, rectangular, etc. Exactly which properties $$K$$ needs to satisfy will depend on what properties you want, but the general baseline is just that:
• $$\int K(x) \, dx = 1$$ so that the overall estimate integrates to 1;
• usually $$K(x) \ge 0$$ so that, combined with the previous one, the overall estimate is a valid density;
• usually $$K(-x) = K(x)$$ for simplicity.