weight_continuous: Weight for the continuous effect sizes

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/weight_continuous.R

Description

Compute weight from the probability of the rank given the effect size for the continuous effect size

Usage

1
weight_continuous(alpha, et, m, tail = 1L, delInterval = 0.001, ranksProb)

Arguments

alpha

Numeric, significance level of the hypothesis test

et

Numeric, mean effect size of the test statistics

m

Integer, totoal number of hypothesis test

tail

Integer (1 or 2), right-tailed or two-tailed hypothesis test. default is right-tailed test.

delInterval

Numeric, interval between the delta values of a sequence. Note that, delta is a LaGrange multiplier, necessary to normalize the weight

ranksProb

Numeric vector of ranks probability of the tests given the effect size

Details

If one wants to test

H_0: epsilon_i = 0 vs. H_a: ε_i > 0,

then et and ey should be mean value of the test and filter effect sizes, respectively. This is called hypothesis testing for the continuous effect sizes.

Value

weight Numeric vector of normalized weight of the tests for the continuous case

Author(s)

Mohamad S. Hasan, shakilmohamad7@gmail.com

See Also

prob_rank_givenEffect weight_binary

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# 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 continuous case
weight_cont <- weight_continuous(alpha = .05, et = 1, m = 100, tail = 1,
                                     delInterval = .0001, ranksProb = prob2)

# plot the weight
plot(ranks, weight_cont)

OPWeight documentation built on Nov. 8, 2020, 11:06 p.m.