## 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)
)
## Perform the CTP using a local Bonferroni test
CTP_LocalTest(function(x) {
min(c(length(x) * min(x), 1))
}, pvals)
Run the code above in your browser using DataLab