kde(x, h, xgrid, ngrid, kernel = c("epan", "unif", "tria", "quar", "triw", "tric", "gaus", "cos"), plot = FALSE)x.NULL."unif" (uniform), "tria" (triangular), "epan" (epanechnikov), "quar" (quartic), "triw" (triweight), "tric" (tricube), "gaus" (gaussian) and "cos" (cosine). The default is "epan". Wand, M. P. and Jones, M. C. (1995). Kernel Smoothing. Chapman and Hall, London.
x <- rnorm(200,2,3)
# with default bandwidth
kde(x, kernel = "quar", plot = TRUE)
# with specified bandwidth
kde(x, h = 4, kernel = "quar", plot = TRUE)
Run the code above in your browser using DataLab