Description Usage Arguments Value Examples
This function estimate Proportion of Simultaneous True Nulls in Two Independent Experiments from the inputs including 2 vectors of p-values.
1 | pi00(p1, p2, lambda1, lambda2)
|
p1, p2 |
vectors of p-values of the two independent experiments. |
lambda1, lambda2 |
lambda thresholds for the two experiments. |
The function returns an estimate of the proportion of the number of true simultaneous nulls. The value is a real number between 0 and 1.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | n <- 1000
n11 <- 25; n10 <- n01 <- 0; n00 <- n - (n11 + n10 + n01)
mu1 <- rep(0, n)
mu1[1:(n11+n10)] <- rnorm(n = n11+n10, mean = 6,sd = 1)
t1 <- plyr::laply(1:n, function(i)rt(n = 1, df = 4, ncp = mu1[i]))
p1 <- plyr::laply(1:n, function(i)2*pt(q = abs(t1[i]), df = 4, ncp = 0, lower.tail = FALSE))
lambda1 <- estimate.lambda(p1, B = 20)
mu2 <- rep(0, n)
mu2[c(1:n11, (n11+n10+1):(n11+n10+n01))] <- rnorm(n = n11+n01, mean = 6,sd = 1)
t2 <- plyr::laply(1:n, function(i)rt(n = 1, df = 4, ncp = mu2[i]))
p2 <- plyr::laply(1:n, function(i)2*pt(q = abs(t2[i]), df = 4, ncp = 0, lower.tail = FALSE))
lambda2 <- estimate.lambda(p2, B = 20)
pi_00 <- pi00(p1, p2, lambda1, lambda2)
pi_00
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.