set.seed(5193)
### make some p-values
m=500 #the nr of hypotheses
nrfalse=100 #the nr of false hypotheses
tstats = rnorm(n=m) #m test statistics
tstats[1:nrfalse] = tstats[1:nrfalse] + 3 #add some signal
P = 1 - pnorm(tstats) #compute p-values
P.adjusted = mFDP.adjust(P=P) #mFDP-adjusted p-values. Be careful with interpretation.
min(P.adjusted) #0.0208
Run the code above in your browser using DataLab