R/KS.R

KS <- function (y, tr, tl, ...) {
  ## Kolmogorov-Smirnov statistic
  suppressWarnings(
      ks <- stats::ks.test(y[tr==tl], y[tr!=tl], exact=FALSE,
                           alternative="two.sided")
  )
  return(ks$statistic)
}

Try the NPC package in your browser

Any scripts or data that you put into this service are public.

NPC documentation built on May 2, 2019, 5:07 a.m.