1、KS统计量

Kolmogorov-Smirnov Tests

Gene Set Enrichment Analysis

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
source("signed-ks-test.R")

# c("two.sided", "less", "greater")
ks = ks.test.2(c(2,10,11,20), 1:100,  alternative = "greater")
# 	Two-sample Kolmogorov-Smirnov test

# data:  c(2, 10, 11, 20) and 1:100
# D^+ = 0.8, p-value = 0.007277
# alternative hypothesis: the CDF of x lies above that of y
ks$ES
# [1] 0.8
ks$p.value
# [1] 0.007276706