KS.test(x, y, ..., kernel = c("epan", "unif", "tria",
"quar", "triw", "tric", "gaus", "cos"), hx, hy,
alternative = c("two.sided", "less", "greater"))
"pnorm"
. Only continuous CDFs are valid.y
."unif"
(uniform), "tria"
(triangular), "epan"
(epanechnikov), "quar"
(quartic), "triw"
(triweight), x
. See 'Details' of the default bandwidth.y
. See 'Details' of the default bandwidth.two.sided
" (default), "less
", or "greater
".ks.test
# one-sample Kolmogorov-Smirnov test
x <- rnorm(100,2,3)
KS.test(x, "pnorm", 2, 3)
# two-sample Kolmogorov-Smirnov test
y <- rgamma(100,1,6)
KS.test(x,y)
Run the code above in your browser using DataLab