p.adjust {base} | R Documentation |
Given a set of p values, returns p values adjusted using one of several methods.
p.adjust(p, method=p.adjust.methods, n=length(p))
p.adjust.methods # c("holm", "hochberg", "bonferroni","none")
p |
vector of p values |
method |
correction method |
n |
number of comparisons |
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
.
A vector of corrected p values.
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.
S Paul Wright: Adjusted P-values for simultaneous inference, Biometrics 48, 1005–1013
pairwise.*
functions in the ctest
package, such
as pairwise.t.test
.
p <- runif(50)
p.adjust(p)