Skip to contents

Represent symmetric smoothing kernels:: normal, cosine, triweight, quartic and uniform.

Usage

Kernel(u, type.Ker = "Ker.norm")

Arguments

u

Data.

type.Ker

Type of Kernel. By default normal kernel.

Value

Returns symmetric kernel.

Details

Ker.norm=dnorm(u)
Ker.cos=ifelse(abs(u)<=1,pi/4*(cos(pi*u/2)),0)
Ker.epa=ifelse(abs(u)<=1,3/4*(1-u^2),0)
Ker.tri=ifelse(abs(u)<=1,35/32*(1-u^2)^3,0)
Ker.quar=ifelse(abs(u)<=1,15/16*(1-u^2)^2,0)
Ker.unif=ifelse(abs(u)<=1,1/2,0)

Type of kernel:

Normal Kernel: Ker.norm
Cosine Kernel: Ker.cos
Epanechnikov Kernel: Ker.epa
Triweight Kernel: Ker.tri
Quartic Kernel: Ker.quar
Uniform Kernel: Ker.unif

References

Ferraty, F. and Vieu, P. (2006). Nonparametric functional data analysis. Springer Series in Statistics, New York.

Hardle, W. Applied Nonparametric Regression. Cambridge University Press, 1994.

Author

Manuel Febrero-Bande, Manuel Oviedo de la Fuente manuel.oviedo@udc.es

Examples

y=qnorm(seq(.1,.9,len=100))
a<-Kernel(u=y)
b<-Kernel(type.Ker="Ker.tri",u=y)
c=Ker.cos(y)