adjustPValues {midasHLA} | R 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 `NA`s). 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).

[Package midasHLA version 1.2.0 Index]