get_qvals: Adjust P-values for Multiple Comparisons

View source: R/prot_p_adjust.R

get_qvalsR Documentation

Adjust P-values for Multiple Comparisons

Description

Given data frame or a vector of p-values, creates a data frame with column(s) containing p-values adjusted using one or more methods.

Usage

get_qvals(pvals, signs, method, threshold_excess1)

Arguments

pvals

A numeric vector of p-values (possibly with NAs).

signs

A numeric vector containing only -1, 1, 0 and NA. It indicates the sign of the corresponding T statistics.

method

Correction method. Can be abbreviated. Defaults to "fdr". To get all available methods, type c("fdrtool", p.adjust.methods). For more information on the "fdrtool" method, check out the package fdrtool by Bernd Klaus and Korbinian Strimmer. For more information on the other methods, see the p.adjust function.

threshold_excess1

A numeric value between 0 and 1 indicating the threshold at which correcting for an excess in p-values close to 1 should be performed. This is sometimes needed when a null distribution needs to be fitted. Note that the method still accounts for the total number of p-values when performing this correction. Only if there is, according to a binomial test, a significant enrichment of p-values above an automatically determined cut-off at the threshold_excess1 significance level, a correction for enrichment in p-values close to 1 will be performed. If you never want to correct for an excess in p-values close to 1, set threshold_excess1 to 0. If you always want to correct for an excess in p-values close to 1, set threshold_excess1 to 1. Defaults to 1e-90.

Value

A data frame containing either one column with corrected p-values, or when method = "fdrtool", a data frame with three columns: p-values adjusted for scale and proportion of null values, q-values (FDR) and local fdr.

Examples

.....

statOmics/MSqRob documentation built on Dec. 8, 2022, 6 a.m.