weight_binary {OPWeight} | R Documentation |
Compute weight from the probability of the rank given the effect size for the binary effect size
weight_binary(alpha, et, m, m1, tail = 1L, delInterval = 0.001, ranksProb)
alpha |
Numeric, significance level of the hypothesis test |
et |
Numeric, mean effect size of the test statistics |
m |
Integer, totoal number of hypothesis test |
m1 |
Integer, number of true alternative hypothesis |
tail |
Integer (1 or 2), right-tailed or two-tailed hypothesis test. default is right-tailed test. |
delInterval |
Numeric, interval between the |
ranksProb |
Numeric vector of the ranks probability of the tests given the effect size |
If one wants to test
H_0: epsilon_i=0 vs. H_a: epsilon_i = epsilon,
then et
and ey
should be median or any discrete value of the test
and filter effect sizes, respectively. This is called hypothesis testing for
the Binary effect sizes. m1
can be estimated using qvalue
from
a bioconductor package qvalue
.
weight
Numeric vector of normalized weight of the tests for
the binary case
Mohamad S. Hasan, shakilmohamad7@gmail.com
prob_rank_givenEffect
weight_continuous
qvalue
# 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 prob2 <- sapply(ranks, prob_rank_givenEffect, et = 2, ey = 1, nrep = 10000, m0 = 50, m1 = 50) # plot the prooabbility plot(ranks, prob2) # compute weight for the binary case weight_bin <- weight_binary(alpha = .05, et = 1, m = 100, m1 = 50, tail=1, delInterval = .0001, ranksProb = prob2) # plot the weight plot(ranks, weight_bin)