compKernVals | R Documentation |
Some R code provided to compute kernel related values.
computeRK(kernel, lower=dom(kernel)[[1]], upper=dom(kernel)[[2]], subdivisions = 25) computeK4(kernel, lower=dom(kernel)[[1]], upper=dom(kernel)[[2]], subdivisions = 25) computeMu(i, kernel, lower=dom(kernel)[[1]], upper=dom(kernel)[[2]], subdivisions = 25) computeMu0(kernel, lower=dom(kernel)[[1]], upper=dom(kernel)[[2]], subdivisions = 25) Kconvol(kernel,lower=dom(kernel)[[1]],upper=dom(kernel)[[2]], subdivisions = 25)
kernel |
Kernel used to perform the estimation, see |
i |
Order of kernel moment to compute |
lower, upper |
Integration limits. |
subdivisions |
the maximum number of subintervals. |
These functions uses function integrate
.
A numeric value returning:
computeK4 |
The fourth order autoconvolution of |
computeRK |
The second order autoconvolution of |
computeMu0 |
The integral of |
computeMu2 |
The second order moment of |
computeMu |
The i-th order moment of |
Kconvol |
The autoconvolution of |
These functions are implemented by means of integrate
.
Jorge Luis Ojeda Cabrera.
Fan, J. and Gijbels, I. Local polynomial modelling and its applications\/. Chapman & Hall, London (1996).
Wand, M.~P. and Jones, M.~C. Kernel smoothing\/. Chapman and Hall Ltd., London (1995).
RK
, Kernel characteristics, integrate
.
## Note that lower and upper params are set in the definition to ## use 'dom()' function. g <- function(kernels) { mu0 <- sapply(kernels,function(x) computeMu0(x,)) mu0.ok <- sapply(kernels,mu0K) mu2 <- sapply(kernels,function(x) computeMu(2,x)) mu2.ok <- sapply(kernels,mu2K) Rk.ok <- sapply(kernels,RK) RK <- sapply(kernels,function(x) computeRK(x)) K4 <- sapply(kernels,function(x) computeK4(x)) res <- data.frame(mu0,mu0.ok,mu2,mu2.ok,RK,Rk.ok,K4) res } g(kernels=c(EpaK,gaussK,TriweigK,TrianK))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.