adjustPVals: Adjusts a numeric vector of p-values.

Description Usage Arguments Value Examples

Description

Wraps around the R base implementation of p.adjust, the methods used in the fdr tool package, and the qvalue package.

Usage

1
adjustPVals(pVals, adjust = "none", plotFdr = FALSE, verbose = FALSE)

Arguments

pVals

Numeric vector of p-values to adjust.

adjust

Allows for resulting p-values to be corrected for multiple hypothesis tests. Optional and some non-default choices require the "fdrtool" package or the "qvalue" package. Default = "none", which means that no p-value adjustment is performed. Other options include methods in ?p.adjust (i.e., "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr"), methods in ?fdrtool (i.e., "fndr", "pct0", "locfdr"), and methods in ?qvalue (i.e. "qvalue").

plotFdr

Allows for plotting of fdrtool or qvalue p-value adjustment result, if this is chosen. Requires fdrtool package or qvalue package. Default = FALSE.

verbose

If TRUE, the function prints out the general method used for multiple correction analysis. Default = FALSE.

Value

A numeric vector of p-values (or q-values) that have been adjusted according to the specified method.

Examples

1
2
3
4
pvals = runif(100, 0, 1)
adj_pvals_bh = adjustPVals(pvals, adjust = "BH")
adj_pvals_hommel = adjustPVals(pvals, adjust = "hommel")
adj_pvals_qval = adjustPVals(pvals, adjust = "qvalue")

nosarcasm/DGCA documentation built on June 13, 2019, 11:49 p.m.