powered by
Find the sample size needed to have a desired false discovery rate and average power for a large number of t-tests for non-zero correlation.
n.fdr.tcorr(fdr, pwr, rho, pi0.hat = "BH")
A list with the following components:
sample size estimate
average power
desired average power
desired FDR
proportion of tests with a true null hypothesis
fixed p-value threshold for multiple testing procedure
number of iteration
maximum number of iteration, default is 50
lower limit for initial sample size range
upper limit for initial sample size range
desired FDR (scalar numeric)
desired average power (scalar numeric)
population correlation coefficient (vector)
method to estimate proportion pi0 of tests with true null, including: "HH" (p-value histogram height), "HM" (p-value histogram mean), "BH" (Benjamini & Hochberg 1995), "Jung" (Jung 2005)
pi0
rho = rep(c(0.3,0),c(100,900)); n.fdr.tcorr(fdr = 0.1, pwr = 0.8, rho = rho, pi0.hat="BH")
Run the code above in your browser using DataLab