weight_byEffect_cont: Weight for the different continuous effect sizes

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

View source: R/weight_byEffect_cont.R

Description

Compute weight from the the ranks probability given the effect sizes when the effect sizes are continuous.

Usage

1
2
weight_byEffect_cont(i, alpha, null, m, tail = 1L, delInterval,
  covariateEffectVec, datByNull)

Arguments

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 delta values of a sequence. Note that, delta is a Langrangian multiplier, necessary to normalize the weight

covariateEffectVec

A numeric vector of covariate effect sizes

datByNull

A numerics matrix of ranks pobabilities in which each column corresponds to an effect size

Details

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.

Value

A numeics matrix of weights in which each column corresponds to an effect size

Author(s)

Mohamad S. Hasan, shakilmohamad7@gmail.com

See Also

ranksProb_byEffect weight_continuous

Examples

 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)

mshasan/OPWpaper documentation built on March 3, 2021, 7:02 a.m.