## Simulate some p-values
## The first 10 are from false hypotheses, the next 10 are from true
pvals = c(
rbeta(10, 1, 20), ## Mean value of .05
runif(10)
)
## Estimate the confidence set using a local Bonferroni test
TopDown_LocalTest(function(x) {
min(c(1, length(x) * min(x)))
}, pvals)
Run the code above in your browser using DataLab