p.adjust(stats)
p.adjust()所属R语言包:stats
Adjust P-values for Multiple Comparisons
调整多重比较的P值
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Given a set of p-values, returns p-values adjusted using
鉴于一套p值,回报p-值调整
用法----------Usage----------
p.adjust(p, method = p.adjust.methods, n = length(p))
p.adjust.methods
# c("holm", "hochberg", "hommel", "bonferroni", "BH", "BY",
# "fdr", "none")
参数----------Arguments----------
参数:p
numeric vector of p-values (possibly with NAs). Any other R is coerced by as.numeric.
p值的数值向量(可能与NAS)。任何其他的R被裹挟as.numeric。
参数:method
correction method
修正方法
参数:n
number of comparisons, must be at least length(p); only set this (to non-default) when you know what you are doing!
数的比较,必须至少length(p);只设置(非默认)当你知道你在做什么!
Details
详情----------Details----------
The adjustment methods include the Bonferroni correction ("bonferroni") in which the p-values are multiplied by the number of comparisons. Less conservative corrections are also included by Holm (1979) ("holm"), Hochberg (1988) ("hochberg"), Hommel (1988) ("hommel"), Benjamini & Hochberg (1995) ("BH" or its alias "fdr"), and Benjamini & Yekutieli (2001) ("BY"), respectively. 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.
调整的方法,包括Bonferroni校正("bonferroni")p值乘以数量比较。不太保守的修正也包括霍尔姆(1979)("holm"),Hochberg(1988)("hochberg"),霍梅尔(1988)("hommel"),Benjamini&Hochberg(1995) ("BH"或其别名"fdr"),Benjamini及Yekutieli(2001)("BY"),分别。一个通过传递选项("none")也包括在内。载于p.adjust.methods效益的方法,需要有作为一种选择的方法,并把它p.adjust向量的方法集。
The first four methods are designed to give strong control of the family-wise error rate. There seems no reason to use the unmodified Bonferroni correction because it is dominated by Holm's method, which is also valid under arbitrary assumptions.
前四种方法设计给家庭明智的错误率控制能力强。似乎没有理由使用未修改的Bonferroni校正,因为它是由霍尔姆的方法,这也是任意的假设下有效控制。
Hochberg's and Hommel's methods are valid when the hypothesis tests are independent or when they are non-negatively associated (Sarkar, 1998; Sarkar and Chang, 1997). Hommel's method is more powerful than Hochberg's, but the difference is usually small and the Hochberg p-values are faster to compute.
hochberg的霍梅尔的方法是有效的假设检验时是独立的,或当他们都是非负相关(萨卡,1998; Sarkar和昌,1997年)。霍梅尔的方法是比Hochberg的更强大,但不同的是通常小和Hochberg p值计算的速度更快。
The "BH" (aka "fdr") and "BY" method of Benjamini, Hochberg, and Yekutieli control the false discovery rate, the expected proportion of false discoveries amongst the rejected hypotheses. The false discovery rate is a less stringent condition than the family-wise error rate, so these methods are more powerful than the others.
"BH"(又名"fdr")"BY"Benjamini,Hochberg和Yekutieli控制的假发现率,其中包括拒绝假说的预期比例虚假发现方法。虚假的发现率是一个比较宽松的条件比家庭明智的错误率,所以这些方法是比别人更强大。
Note that you can set n larger than length(p) which means the unobserved p-values are assumed to be greater than all the observed p for "bonferroni" and "holm" methods and equal to 1 for the other methods.
请注意,您可以设置n大于length(p)这意味着观测到的P-值假定为"bonferroni"和"holm"方法和等于大于所有的观测带够其他方法1。
值----------Value----------
A numeric vector of corrected p-values (of the same length as p, with names copied from p).
一个纠正的p值的数字矢量(从p复制的名字,相同长度为p)。
参考文献----------References----------
Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal Statistical Society Series B, 57, 289–300.
The control of the false discovery rate in multiple testing under dependency. Annals of Statistics 29, 1165–1188.
A simple sequentially rejective multiple test procedure. Scandinavian Journal of Statistics, 6, 65–70.
A stagewise rejective multiple test procedure based on a modified Bonferroni test. Biometrika, 75, 383–386.
A sharper Bonferroni procedure for multiple tests of significance. Biometrika, 75, 800–803.
Multiple hypothesis testing. Annual Review of Psychology, 46, 561–576. (An excellent review of the area.)
Some probability inequalities for ordered MTP2 random variables: a proof of Simes conjecture. Annals of Statistics, 26, 494–504.
Simes' method for multiple hypothesis testing with positively dependent test statistics. Journal of the American Statistical Association, 92, 1601–1608.
Adjusted P-values for simultaneous inference. Biometrics, 48, 1005–1013. (Explains the adjusted P-value approach.)
参见----------See Also----------
pairwise.* functions such as pairwise.t.test.
pairwise.*功能,如pairwise.t.test。
举例----------Examples----------
require(graphics)
set.seed(123)
x <- rnorm(50, mean=c(rep(0,25),rep(3,25)))
p <- 2*pnorm( sort(-abs(x)))
round(p, 3)
round(p.adjust(p), 3)
round(p.adjust(p,"BH"), 3)
## or all of them at once (dropping the "fdr" alias):[#或全部一次(去掉了“罗斯福”的别名):]
p.adjust.M <- p.adjust.methods[p.adjust.methods != "fdr"]
p.adj <- sapply(p.adjust.M, function(meth) p.adjust(p, meth))
p.adj.60 <- sapply(p.adjust.M, function(meth) p.adjust(p, meth, n = 60))
stopifnot(identical(p.adj[,"none"], p), p.adj <= p.adj.60)
round(p.adj, 3)
## or a bit nicer:[#或变得更好:]
noquote(apply(p.adj, 2, format.pval, digits = 3))
## and a graphic:[#和图形:]
matplot(p, p.adj, ylab="p.adjust(p, meth)", type = "l", asp=1, lty=1:6,
main = "P-value adjustments")
legend(.7,.6, p.adjust.M, col=1:6, lty=1:6)
## Can work with NA's:[#NA的工作:]
pN <- p; iN <- c(46,47); pN[iN] <- NA
pN.a <- sapply(p.adjust.M, function(meth) p.adjust(pN, meth))
## The smallest 20 P-values all affected by the NA's :[#所有的NA的影响最小的20个P-值:]
round((pN.a / p.adj)[1:20, ] , 4)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|