ranksProb_byEffect: Ranks probability of the covariate given the test-effect size

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

View source: R/ranksProb_byEffect.R

Description

Comnpute the ranks probability for different test-effect sizes

Usage

1
ranksProb_byEffect(i, null, m, nrep = 10000, covariateEffectVec)

Arguments

i

i Integer, i-th effect size of a vector of effects

null

Numeric, proportion of the true null hypothesis

m

Integer, total number of hypothesis test

nrep

Integer, number of replications for the importance sampling

covariateEffectVec

A numeric vector of the covariate-effect sizes

Details

This function compute ranks probabilities for the different effect sizes. It apply the function prob_ranks_givenEffect from the OPWeight package and compute the probabilities.

Value

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

Author(s)

Mohamad S. Hasan, shakilmohamad7@gmail.com

See Also

prob_rank_givenEffect

Examples

1
2
3
4
5
6
# vector of effect sizes
covariateEffectVec <- c(1, 1.5, 2)

# compute ranks probability matrix
ranksProb_byEffect <- sapply(1:length(covariateEffectVec), ranksProb_byEffect,
             null = .9, m = 100, covariateEffectVec = covariateEffectVec)

mshasan/OPWpaper1 documentation built on Feb. 22, 2021, 10:22 a.m.