simu_fwer: Simulate Family Wise Error Rate (FWER)

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

View source: R/simu_fwer.R

Description

This function simulate family wise error rate or test type I error rate

Usage

1
simu_fwer(s, m, alphaVec)

Arguments

s

Integer, number of replications in a simulation

m

Integer, total number of hypothesis test

alphaVec

A numeric vector of the significance levels

Details

This function generate pvalues from the uniform(0, 1) and then apply the function opw from the R package OPWeight to obtain the Familly Wise Error Rate (FWER)

Value

A numeric matrix of FWER for the different p-value weighting methods

Author(s)

Mohamad S. Hasan, shakilmohamad7@gmail.com

References

Hasan and Schliekelman (2017)

See Also

qvalue prob_rank_givenEffect weight_binary weight_continuous

Examples

1
2
3
alphaVec = .05
simVal = 1:3  # in actual case use at least simVal = 1000
typeIerror_mat = sapply(simVal, simu_fwer, m = 100, alphaVec = alphaVec)

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