p.adjust {base} | 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

    p.adjust(p, method=p.adjust.methods, n=length(p))
    p.adjust.methods # c("holm", "hochberg", "bonferroni","none")

### Arguments

`p` | vector of p values
`method` | correction method
`n` | number of comparisons

### Details

The adjustment methods include the Bonferroni correction in which the p values are multiplied by the number of comparisons. Two less conservative corrections by Holm, respectively Hochberg, are also included. A pass-through option `"none"` is also included. The set of methods are contained in the `p.adjust.methods` vector for the benefit of methods that need to have the method as an option and pass it on to `p.adjust`.

### Value

A vector of corrected p values.

### Note

The Hochberg method is only proved to work if the p values are independent, although simulations have indicated that it works in correlated cases as well. Hence the Holm method is the default.

### References

S Paul Wright: Adjusted P-values for simultaneous inference, Biometrics 48, 1005–1013

### See Also

`pairwise.*` functions in the `ctest` package, such as `pairwise.t.test`.

### Examples

      p <- runif(50)
      p.adjust(p)

[Package Contents]