Montag, 24. November 2014

p-values uniformly distributed

Are p-values really uniformly distributed? They are:


library(DescTools)
gg <- rnorm(10000)
n <- 100
m <- sapply(1:n, function(x) sample(1:10000, size = n))
m[] <- gg[m]

d.frm <- data.frame(x=as.vector(m), grp=factor(rep(1:n, each=n)))
p <- na.omit(as.vector(pairwise.t.test(x = d.frm$x, g = d.frm$grp,
                                       p.adjust.method = "none", pool.sd = FALSE)$p.value))
Desc(p)



See: https://www.youtube.com/watch?v=5OL1RqHrZQ8



Keine Kommentare: