Rev 7871 | Blame | Last modification | View Log | Download | RSS feed
\name{p.adjust}\alias{p.adjust}\alias{p.adjust.methods}\title{Adjust p values for multiple comparisons}\description{Given a set of p values, returns p values adjusted using one ofseveral methods.}\usage{p.adjust(p, method=p.adjust.methods, n=length(p))p.adjust.methods # c("holm", "hochberg", "bonferroni","none")}\arguments{\item{p}{vector of p values}\item{method}{correction method}\item{n}{number of comparisons}}\details{The adjustment methods include the Bonferroni correction inwhich the p values are multiplied by the number of comparisons. Twoless conservative corrections by Holm, respectively Hochberg,are also included. A pass-through option \code{"none"} is alsoincluded. The set of methods are contained in the\code{p.adjust.methods} vector for the benefit of methods that need tohave the method as an option and pass it on to \code{p.adjust}.}\value{A vector of corrected p values.}\references{ S Paul Wright: Adjusted P-values for simultaneousinference, Biometrics \bold{48}, 1005--1013}\note{The Hochberg method is only proved to work if the p values areindependent, although simulations have indicated that it works incorrelated cases as well. Hence the Holm method is the default.}\seealso{\code{pairwise.*} functions in the \code{ctest} package, suchas \code{\link[ctest]{pairwise.t.test}}.}\examples{p <- runif(50)p.adjust(p)}\keyword{ htest }