ControlFDR: Adjust p-values for simple multiple-testing procedures

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

View source: R/utils_multtest_pvalues.R

Description

This is a modification of the mt.rawp2adjp function from the Bioconductor package multtest. We fixed an error wherein selecting the "TSBH" option overwrote the results of any previous adjustment methods, and another error created when the "BY" and "TSBH" methods were called simultaneously. We did not write the original function. For more information, see https://www.bioconductor.org/packages/3.7/bioc/manuals/multtest/man/multtest.pdf.

Usage

1
2
3
4
5
6
7
8
ControlFDR(
  rawp,
  proc = c("BH", "BY", "ABH", "TSBH", "Bonferroni", "Holm", "Hochberg", "SidakSS",
    "SidakSD"),
  alpha = 0.05,
  na.rm = FALSE,
  as.multtest.out = FALSE
)

Arguments

rawp

A vector of raw (unadjusted) p-values for each hypothesis under consideration. These could be nominal p-values, for example, from t-tables, or permutation p-values.

proc

A vector of character strings containing the names of the multiple testing procedures for which adjusted p-values are to be computed. This vector should include any of the options listed in the "Details" Section. Adjusted p-values are computed for simple FWER- and FDR- controlling procedures based on a vector of raw (unadjusted) p-values. Defaults to "BH".

alpha

A nominal Type-I error rate, or a vector of error rates, used for estimating the number of true null hypotheses in the two-stage Benjamini & Hochberg procedure ("TSBH"). Default is 0.05.

na.rm

An option for handling NA values in a list of raw p- values. If FALSE, the number of hypotheses considered is the length of the vector of raw p-values. Otherwise, if TRUE, the number of hypotheses is the number of raw p-values which were not NAs.

as.multtest.out

Should the output match the output from the mt.rawp2adjp function? If not, the output will match the input (a vector). Defaults to FALSE.

Details

This function computes adjusted p-values for simple multiple testing procedures from a vector of raw (unadjusted) p-values. The procedures include the Bonferroni, Holm (1979), Hochberg (1988), and Sidak procedures for strong control of the family-wise Type-I error rate (FWER), and the Benjamini & Hochberg (1995) and Benjamini & Yekutieli (2001) procedures for (strong) control of the false discovery rate (FDR). The less conservative adaptive Benjamini & Hochberg (2000) and two-stage Benjamini & Hochberg (2006) FDR-controlling procedures are also included.

The proc options are

Value

A vector of the same length and order as rawp, unless the user specifies that the output should match the output from the multtest package. In that case, the use should specify as.multtest.out = TRUE and this function will return output identical to that of the mt.rawp2adjp function from package multtest. That output is as follows:

Author(s)

Sandrine Dudoit, http://www.stat.berkeley.edu/~sandrine

Yongchao Ge, yongchao.ge@mssm.edu

Houston Gilbert, http://www.stat.berkeley.edu/~houston

See Also

AESPCA_pVals SuperPCA_pVals

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
  # DO NOT CALL THIS FUNCTION DIRECTLY.
  # Call this function through AESPCA_pVals() or SuperPCA_pVals() instead.

## Not run: 
  ###  Load the Example Data  ###
  data("colonSurv_df")
  data("colon_pathwayCollection")

  ###  Create an OmicsSurv Object  ###
  colon_Omics <- CreateOmics(
    assayData_df = colonSurv_df[, -(2:3)],
    pathwayCollection_ls = colon_pathwayCollection,
    response = colonSurv_df[, 1:3],
    respType = "surv"
  )

  ###  Extract Pathway PCs and Loadings  ###
  colonPCs_ls <- ExtractAESPCs(
    object = colon_Omics,
    parallel = TRUE,
    numCores = 2
  )

  ###  Pathway p-Values  ###
  pVals <- PermTestSurv(
    OmicsSurv = colon_Omics,
    pathwayPCs_ls = colonPCs_ls$PCs,
    parallel = TRUE,
    numCores = 2
  )

  ###  Adjust p-Values  ###
  ControlFDR(rawp = pVals)

## End(Not run)

pathwayPCA documentation built on Dec. 15, 2020, 6:14 p.m.