Contents
Initialize p-values
p = [0.0001, 0.0004, 0.0019, 0.0095, 0.0201, 0.0278, 0.0298, ...
0.0344, 0.0459, 0.324, 0.4262, 0.5719, 0.6528, 0.759, 1.000]
m = length(p)
p =
Columns 1 through 11
0.0001 0.0004 0.0019 0.0095 0.0201 0.0278 0.0298 0.0344 0.0459 0.3240 0.4262
Columns 12 through 15
0.5719 0.6528 0.7590 1.0000
m =
15
Control the FWER at level 0.05 using the Bonferroni correction
t = 0.05/m
p(p <= t)
t =
0.0033
ans =
0.0001 0.0004 0.0019
Estimate the FDR corresponding to each p-value
import org.mensxmachina.stats.mt.error.fdr.lambda.storey2002.storey2002fdrestimator;
storey2002 = storey2002fdrestimator();
fdr = storey2002.estimate(p)
fdr =
Columns 1 through 11
0.0015 0.0030 0.0095 0.0356 0.0603 0.0695 0.0639 0.0645 0.0765 0.4860 0.5812
Columns 12 through 15
0.7149 0.7532 0.8132 1.0000
Control the FDR at level 0.05
import org.mensxmachina.stats.mt.mtp.error...stepupmptthreshold;
t = stepupmptthreshold(p, fdr, 0.05)
p(p <= t)
t =
0.0095
ans =
0.0001 0.0004 0.0019 0.0095