# NOT RUN {
#Generate a vector of pvalues
set.seed(102)
m <- 10
pvalues <- c(runif(0.5*m,0,0.02), runif(0.5*m,0,1))
# First step: create a hommel object.
# Use Simes'test (simes = TRUE) or Hommel's robust test (simes = FALSE)
hom <- hommel(pvalues, simes = TRUE)
hom
summary(hom)
# Find lower confidence bounds
# for the number of false null hypotheses (discoveries)
# In any subset of interest
discoveries(hom, 1:2)
# a bound for the false discovery proportion:
set <- 1:5
fdp(hom, set)
# or incremental for sets ix = (1), (1,2), (1,2,3), (1,2,3,4) and (1,2,3,4,5)
fdp(hom, set, incremental = TRUE)
# use alpha=0.5 to obtain a conservative point estimate
tdp(hom, set, alpha=0.5)
# }
Run the code above in your browser using DataLab