Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/weight_byEffect_bin.R
Compute the weights from the ranks probability given the test-effect sizes when the effect sizes are binary.
1 2 | weight_byEffect_bin(i, alpha, null, m, tail = 1L, delInterval,
covariateEffectVec, datByNull)
|
i |
Integer, i-th effect size of a vector of effects |
alpha |
Numeric, a significance level of the hypothesis tests |
null |
Numeric, proportion of true true null tests |
m |
Integer, total number of hypotheis tests |
tail |
Integer (1 or 2), right-tailed or two-tailed hypothesis test. |
delInterval |
Numeric, interval between the |
covariateEffectVec |
A numeric vector of covariate-effect sizes |
datByNull |
A numeric matrix of the ranks pobabilities in which each column corresponds to an effect size |
This function compute the weights when the effect sizes are
binary by applying the ranks probabilities of the different effect sizes.
It applies the function function weight_binary
from the R package
OPWeight
to comute the weights from a probability matirx.
A numeics matrix of weights in which each column corresponds to an effect size
Mohamad S. Hasan, shakilmohamad7@gmail.com
ranksProb_byEffect
weight_binary
1 2 3 4 5 6 7 8 9 10 11 12 | # vector of effect sizes
covariateEffectVec <- c(1, 1.5, 2)
# compute probability matrix
ranksProb_byEffect <- sapply(1:length(covariateEffectVec), ranksProb_byEffect,
null = .9, m = 100, covariateEffectVec = covariateEffectVec)
# compute weights
weightByEffect <- sapply(1:length(covariateEffectVec), weight_byEffect_bin,
alpha = .05, null = .9, m = 100, delInterval = .01,
covariateEffectVec = covariateEffectVec,
datByNull = ranksProb_byEffect)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.