adjustPValues: Adjust P-values for Multiple Comparisons

View source: R/utils.R

adjustPValuesR Documentation

Adjust P-values for Multiple Comparisons

Description

Given a set of p-values, returns p-values adjusted using one of several methods.

Usage

adjustPValues(p, method, n = length(p))

Arguments

p

numeric vector of p-values (possibly with NAs). Any other R object is coerced by as.numeric.

method

correction method. Can be abbreviated.

n

number of comparisons, must be at least length(p); only set this (to non-default) when you know what you are doing! Note that for Bonferroni correction it is possible to specify number lower than length(p).

Details

This function modifies stats::p.adjust method such that for Bonferroni correction it is possible to specify n lower than length(p). This feature is useful in cases when knowledge about the biology or redundance of alleles reduces the need for correction.

See p.adjust for more details.

Value

A numeric vector of corrected p-values (of the same length as p, with names copied from p).


Genentech/midasHLA documentation built on Feb. 12, 2024, 9:38 a.m.