Skip to content
This repository has been archived by the owner on Oct 3, 2021. It is now read-only.

dirkschumacher/PValueAdjust.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Coverage Status PValueAdjust

PValueAdjust.jl

Some methods to adjust p-values for multiple comparisons in Julia. The various methods can be called using the function padjust. padjust takes an array of p-values and a second method parameter and returns an array of adjusted p-values. padjust also accepts the method :none. This is also the default method, if no method parameter is set. Please refer to the documentation of the corresponding function in R or to Wikipedia (FWER, FDR), if you want to know more on this topic.

All methods are tested against the R function p.adjust.

Current stable version is 2.0.0.

Install

# get the latest stable version
Pkg.add("PValueAdjust")

# get the latest development version
Pkg.clone("git:https://github.com/dirkschumacher/PValueAdjust.jl.git")

Methods

Control the familywise error rate (FWER)

Bonferroni

julia > pValues = [0.05, 0.03, 0.01, 0.5]
julia > padjust(pValues, method = :bonferroni)
4-element Array{Float64,1}:
 0.2 
 0.12
 0.04
 1.0

Hochberg

julia > pValues = [0.05, 0.03, 0.01, 0.5]
julia > padjust(pValues, method = :hochberg)
4-element Array{Float64,1}:
 0.1 
 0.09
 0.04
 0.5

Holm

Also known as the Holm–Bonferroni method.

julia > pValues = [0.05, 0.03, 0.01, 0.5]
julia > padjust(pValues, method = :holm)
4-element Array{Float64,1}:
 0.1 
 0.09
 0.04
 0.5

Control the false discovery rate (FDR)

Benjamini-Hochberg

julia > pValues = [0.05, 0.03, 0.01, 0.5]
julia > padjust(pValues, method = :benjaminiHochberg)
4-element Array{Float64,1}:
 0.0666667
 0.06     
 0.04     
 0.5

Benjamini-Hochberg-Yekutieli

julia > pValues = [0.05, 0.03, 0.01, 0.5]
julia > padjust(pValues, method = :benjaminiYekutieli)
4-element Array{Float64,1}:
 0.138889 
 0.125    
 0.0833333
 1.0

Versioning

This package uses Semantic Versioning 2.0.

References

Benjamini, Y., and Hochberg, Y. (1995). Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal Statistical Society Series B 57, 289–300.

Benjamini, Y., and Yekutieli, D. (2001). The control of the false discovery rate in multiple testing under dependency. Annals of Statistics 29, 1165–1188.

Hochberg, Y. (1988). A sharper Bonferroni procedure for multiple tests of significance. Biometrika 75, 800–803.

Holm, S. (1979). A simple sequentially rejective multiple test procedure. Scandinavian Journal of Statistics 6, 65–70.

About

[deprecated] P-value adjustment methods for multiple testing correction

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages