Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/prob_rank_givenEffect.R
Comnpute the probability of rank of a test being higher than any other tests given the effect size from external information.
1 | prob_rank_givenEffect(k, et, ey, nrep = 10000, m0, m1)
|
k |
Integer, rank of a test |
et |
Numeric, effect of the targeted test for importance sampling |
ey |
Numeric, mean filter efffect from the external information |
nrep |
Integer, number of replications for importance sampling |
m0 |
Integer, number of true null hypothesis |
m1 |
Integer, number of true alternative hypothesis |
If one wants to test
H_0: epsilon_i=0 vs. H_a: epsilon_i > 0,
then ey
should be mean of the filter effect sizes,
This is called hypothesis testing for the continuous effect sizes.
If one wants to test
H_0: epsilon_i=0 vs. H_a: epsilon_i = epsilon,
then ey
should be median or any discrete value of the
filter effect sizes. This is called hypothesis testing for the Binary
effect sizes.
If monitor = TRUE
then a window will open to see the progress of the
computation. It is useful for a large number of tests
m1
and m0
can be estimated using qvalue
from
a bioconductor package qvalue
.
prob
Numeric, probability of the rank of a test
Mohamad S. Hasan, shakilmohamad7@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 | # compute the probability of the rank of a test being third if all tests are
# from the true null
prob <- prob_rank_givenEffect(k = 3, et = 0, ey = 0, nrep = 10000,
m0 = 50, m1 = 50)
# compute the probabilities of the ranks of a test being rank 1 to 100 if the
# targeted test effect is 2 and the overall mean filter effect is 1.
ranks <- 1:100
prob <- sapply(ranks, prob_rank_givenEffect, et = 2, ey = 1, nrep = 10000,
m0 = 50, m1 = 50)
# plot
plot(ranks,prob)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.