Thursday, September 5, 2013

Calculate FDR-adjusted p values in R

#This example shows how to calculate FDR-adjusted p values.


p<-c(...);

p2<-c(p.adjust(p, method=p.adjust.methods[7],n=length(p)));

write.table(p2,file="X://wzy/out.txt", row.names=FALSE, col.names=FALSE,sep=",");


Note:
> p.adjust.methods
[1] "holm"       "hochberg"   "hommel"     "bonferroni" "BH"      
[6] "BY"         "fdr"        "none"

No comments:

Post a Comment