Package ubic.basecode.math
Class MultipleTestCorrection
java.lang.Object
ubic.basecode.math.MultipleTestCorrection
Methods for p-value correction of sets of hypothesis tests.
FIXME make this API more consistent.
- Author:
- Paul Pavlidis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DoubleArrayList
benjaminiHochberg
(DoubleArrayList pvalues) static DoubleMatrix1D
benjaminiHochberg
(DoubleMatrix1D pvalues) static double
benjaminiHochbergCut
(DoubleArrayList pvalues, double fdr) Benjamini-Hochberg method.static double
BenjaminiYekuteliCut
(DoubleArrayList pvalues, double fdr) Benjamini-Yekuteli method.static double
BonferroniCut
(DoubleArrayList pvalues, double fwe) Determine the Bonferroni pvalue threshold to maintain the family wise error rate (assuming pvalues are independent).
-
Constructor Details
-
MultipleTestCorrection
public MultipleTestCorrection()
-
-
Method Details
-
benjaminiHochberg
- Parameters:
pvalues
-- Returns:
- false discovery rates (FDR) computed using the method of Benjamini and Hochberg. The order is the same as the original pvalues (that is, each value fdr[i] corresponds to the pvaluesp[i].
-
benjaminiHochberg
- Parameters:
pvalues
- ; can contain missing values or invalid pvalues (outside range [0-1]), which are ignored.- Returns:
- false discovery rates (FDRs) computed using the method of Benjamini and Hochberg; or null if they could not be computed. The order is the same as the original pvalues (that is, each value fdr[i] corresponds to the pvaluesp[i].
-
benjaminiHochbergCut
Benjamini-Hochberg method. Determines the maximum p value to maintain the false discovery rate. (Assuming pvalues are independent);- Parameters:
pvalues
- list of pvalues. Need not be sorted.fdr
- false discovery rate (value q in B-H).- Returns:
- The maximum pvalue that maintains the false discovery rate
- Throws:
IllegalArgumentException
- if invalid pvalues are encountered.
-
BenjaminiYekuteliCut
Benjamini-Yekuteli method. Determines the maximum p value to maintain the false discovery rate. Valid under dependence of the pvalues. This method is more conservative than Benjamini-Hochberg.- Parameters:
pvalues
- list of pvalues. Need not be sorted.fdr
- false discovery rate (value q in B-H).- Returns:
- The maximum pvalue that maintains the false discovery rate
- Throws:
IllegalArgumentException
- if invalid pvalues are encountered.
-
BonferroniCut
Determine the Bonferroni pvalue threshold to maintain the family wise error rate (assuming pvalues are independent).- Parameters:
pvalues
- The pvaluesfwe
- The family wise error rate- Returns:
- The minimum pvalue that maintains the FWE
-