Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/weight_byEffect_cont.R
Compute weight from the the ranks probability given the effect sizes when the effect sizes are continuous.
1 2  | weight_byEffect_cont(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 numerics matrix of ranks pobabilities in which each column corresponds to an effect size  | 
This function compute the weights when the effect sizes are
continuous by applying the ranks probabilities of the different effect sizes.
It applies the function function weight_continuous from the R package
OPWeight to compute the weights from a ranks 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_continuous
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_cont,
                   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.