fwerPowerFdrPower_emp: Simulate FWER, POWER, FDR, and POWER

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

View source: R/fwerPowerFdrPower_emp.R

Description

This function simulate Family Wise Error Rate (FWER) and corresponding Power, and False Discovery Rate (FDR) and the corresponding Power for different effect sizes

Usage

1
2
3
fwerPowerFdrPower_emp(i, simu, m, null, corr = 0, cv = 0, alpha = 0.05,
  groupSize = 100L, max.group = 5L, filterEffectVec,
  effectType = c("continuous", "binary"))

Arguments

i

i-th filter effect

simu

number of replications

m

number of hypothesis test

null

proportion of the true null hypothesis

corr

correlation between test statistics

cv

determine whether the test mean effect and the filter mean effects are the same

alpha

significance threshold

groupSize

number of test statistics per group

max.group

maximum number of p-value groups to be used, minimum is 5

filterEffectVec

a vector of different effect size

effectType

type of effect sizes, c("continuous", "binary")

Details

This function empirically simulate Family Wise Error Rate (FWER) and corresponding Power, and False Discovery Rate (FDR) and the corresponding Power for the different effect sizes

Value

a matrix of 16 rows containing information about FWER, POWER, FDR, and POWER (4 rows for each)

Author(s)

Mohamad S. Hasan, mshasan@uga.edu

References

Hasan and Schliekelman (2017)

See Also

fwerPowerFdrPower

Examples

1
2
3
4
5
6
7
# vector of effect sizes
effectVec <- c(1, 1.5, 2)
simuVal = 2
FwerPowerFdrPower <- sapply(1:length(effectVec), fwerPowerFdrPower_emp,
             simu = simuVal, m = 10000, null = .5, corr = 0,
             cv = 0, alpha = .05, groupSize = 100, max.group = 5,
             filterEffectVec = effectVec, effectType = "continuous")

mshasan/empOPW documentation built on March 1, 2021, 4:19 a.m.