把计算出来的储存成一个数组,然后调用函数计算,
一定是所有p值(要计算的p值集合,不能单独只计算一个p值),因为p.adj简单来说就是再p基础上再筛选出新的p值。
p=c(0.01,0.005,0.003,0.010,0.1,0.03,0.0010,0.003,0.05,0.09)
> p
[1] 0.010 0.005 0.003 0.010 0.100 0.030 0.001 0.003 0.050 0.090
> P.adj=p.adjust(p,method = "fdr") #这里method可以选择:"holm", "hochberg", "hommel", "bonferroni", "BH", "BY","fdr", "none" 等
> round(P.adj,digits =3)
[1] 0.017 0.012 0.010 0.017 0.100 0.043 0.010 0.010 0.062 0.100
网友评论