Description Usage Arguments Value Author(s) References See Also Examples

Performs the Group Benjamini-Hochberg procedure when the true proportion of null hypotheses is known within each group. The procedure is applicable whenever group structure about the relationship between different hypotheses is known before testing begins. The idea is to control the FDR within each group and to use the proportion of null hypotheses present within each group to make the testing procedure within that group either more or less conservative – this is in fact the idea behind all adaptive multiple testing procedures.

The Oracle GBH method can also be used when we would like to use the
Adaptive GBH procedure but with estimates of proportions of true null
hypotheses within groups that are not made directly available through
the `Adaptive.GBH`

function – in this case those estimates can be
inputted as the argument `pi.groups`

in the this function `Oracle.GBH`

.

1 | ```
Oracle.GBH(unadj.p, group.index, pi.groups, alpha = 0.05)
``` |

`unadj.p` |
A vector of the unadjusted p-values resulting from a multiple testing experiment. |

`group.index` |
A vector of the same length as the vector of unadjusted p-values,
where a "G" in the jth coordinate indicates that the jth unadjusted
p-values in |

`pi.groups` |
A vector of the known proportions of true null hypotheses within
each of the groups. This vector should be named so that each
element of the |

`alpha` |
The level that we are attempting to control the FDR at. |

An object of class `GBH`

, which provides the adjusted p-values.

Kris Sankaran

Hu, J.X., Zhao, H., and Zhou, H.H. False discovery rate control with groups. Journal of the American Statistical Association, volume 104, number 491. Pages 1215-1227. 2010.

Sankaran, K and Holmes, S. structSSI: Simultaneous and Selective Inference for Grouped or Hierarchically Structured Data. Journal of Statistical Software, 59(13), 1-21. 2014. http://jstatsoft.org/v59/i13/

`GBH-class`

`estimate.pi0`

`Adaptive.GBH`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ```
# A very simple example, with only 5 hypotheses.
unadjp <- c(0.002, 0.1, 0.001, 0.01, 0.4)
names(unadjp) <- paste("hyp", 1:5)
groups <- c(1, 2, 1, 2, 2)
# Say we know goup 1 has pi_0,1 = 0.3 and pi_0,2 = 0.9
pi.groups <- c("1" = 0.3, "2" = 0.9)
Oracle.GBH(unadjp, groups, pi.groups)
# An example where we use an external pi0 estimation routine
unadjp.2 <- c(runif(500, 0, 0.01), runif(1500, 0, 1))
names(unadjp.2) <- paste("hyp", 1:2000)
groups.2 <- c(sample(1:2, 2000, replace = TRUE))
pi.groups <- c("1" = NA, "2" = NA)
for(i in 1:2){
pi.groups[i] <- estimate.pi0(unadjp.2[which(groups.2 == i)], method =
"storey")
}
result <- Oracle.GBH(unadjp.2, groups.2, pi.groups, 0.05)
result@pi0
result@p.vals
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.