kernels function

Kernel function.

Kernel function.

Implementations of kernel functions

W0(x) W1(x) W2(x) W3(x) WDaniell(x, a = (pi/2)) WParzen(u)

Arguments

  • x: real-valued argument to the function; can be a vector
  • a: real number between 0 and pipi
  • u: real number

Details

Daniell kernel function W0:

12πI{xπ}.1/(2pi)Ix<=pi. \frac{1}{2\pi} I\{|x| \leq \pi\}.1/(2pi) I{|x|<=pi}.

Epanechnikov kernel W1 (i. e., variance minimizing kernel function of order 2):

34π(1xπ)2I{xπ}.3/(4pi)(1x/pi)2Ix<=pi. \frac{3}{4\pi} (1-\frac{x}{\pi})^2 I\{|x| \leq \pi\}.3/(4pi) (1-x/pi)^2 I{|x|<=pi}.

Variance minimizing kernel function W2 of order 4:

1532π(7(x/π)410(x/π)2+3)I{xπ}.(15/(32pi)(7(x/pi)410(x/pi)2+3)Ix<=pi. \frac{15}{32\pi} (7(x/\pi)^4 -10(x/\pi)^2+3) I\{|x| \leq \pi\}.(15/(32 pi) (7 (x/pi)^4 - 10 (x/pi)^2 + 3) I{|x|<=pi}.

Variance minimizing kernel function W3 of order 6:

35256π(99(x/π)6+189(x/π)4105(x/π)2+15)I{xπ}.(35/(256pi)(99(x/pi)6+189(x/pi)4105(x/pi)2+15)Ix<=pi. \frac{35}{256\pi} (-99(x/\pi)^6 + 189(x/\pi)^4 - 105(x/\pi)^2+15) I\{|x| \leq \pi\}.(35/(256 pi) (-99(x/pi)^6 + 189(x/pi)^4 - 105(x/pi)^2+15) I{|x|<=pi}.

Kernel yield by convolution of two Daniell kernels:

1π+a(1xaπaI{axπ}). \frac{1}{\pi+a} \Big(1-\frac{|x|-a}{\pi-a} I\{a \leq |x| \leq \pi\}\Big).

Parzen Window for lagEstimators

Examples

plot(x=seq(-8,8,0.05), y=W0(seq(-8,8,0.05)), type="l") plot(x=seq(-8,8,0.05), y=W1(seq(-8,8,0.05)), type="l") plot(x=seq(-8,8,0.05), y=W2(seq(-8,8,0.05)), type="l") plot(x=seq(-8,8,0.05), y=W3(seq(-8,8,0.05)), type="l") plot(x=seq(-pi,pi,0.05), y=WDaniell(seq(-pi,pi,0.05),a=(pi/2)), type="l") plot(x=seq(-2,2,0.05),y=WParzen(seq(-2,2,0.05)),type = "l")
  • Maintainer: Tobias Kley
  • License: GPL (>= 2)
  • Last published: 2024-07-11