Kernel average smoother. The idea of the kernel average smoother is the following. For each data point X 0, choose a constant distance size λ (kernel radius, or window width for p = 1 dimension), and compute a weighted average for all data points that are closer than to X 0 (the closer to X 0 points get higher weights).
3.6 Histogram of ^ when a=0.1 for Epanechnikov Kernel function N=500 . . . .27 3.7 Histogram of ^ when a=0.3 for Epanechnikov Kernel function N=500 . . . .27 3.8 Histogram of ^ when a=0.5 for Epanechnikov Kernel function N=500 . . . .27 3.9 Histogram of ^ when a=0.8 for Epanechnikov Kernel function N=500 . . . .28
Kernel Regression: NW estimator - Different K(.) c K z dz d z K z du K K ( ) 2 2 •Many K(.) are possible. Practical and theoretical considerations limit the choices. Usual choices: Epanechnikov, Gaussian, Quartic (biweight), and Tricube (triweight). • Figure 11.1 shows the NW estimator with Epanechnikov kernel and h=0.5 with the dashed line ...
Kernel Functions. Kernel functions: for all formulas below, r is a radius centered at point s and h is the bandwidth. Exponential: Gaussian: Quartic: Epanechnikov: PolynomialOrder5: Constant: where I(expression) is an indicator function that takes a value of 1 if expression is true and a value of 0 if expression is false.
The Epanechnikov kernel is the standard kernel for kernel density estimation. It generally provides the closest match to a probability density function under most circumstances. The kernel itself is a rounded function similar to the biweight, except it is not differentiable at its boundaries.
lines(x,y.Epanechnikov.Kernel,col="red") 从图中可以看出，局部线性回归（绿色）确实矫正了拟合曲线（红色）。 画出等价核之后的图，相当于书上的图 6.4. 我的代码把li(x0)scale了10倍。书上的应该更高。
kernel: a character string giving the type of kernel function used in the computations. Must be one of: "gaussian", "epanechnikov", "rectangular", "triangular", "biweight", "cosine", "optcosine" (one character is sufficient). weights: a vector of same length as x for computing a weighted density estimate. The weights must be nonnegative and sum to 1.0.