Class MultipleTestCorrection

java.lang.Object
ubic.basecode.math.MultipleTestCorrection

public class MultipleTestCorrection extends Object
Methods for p-value correction of sets of hypothesis tests.

FIXME make this API more consistent.

Author:
Paul Pavlidis
  • Constructor Details

    • MultipleTestCorrection

      public MultipleTestCorrection()
  • Method Details

    • benjaminiHochberg

      public static DoubleArrayList benjaminiHochberg(DoubleArrayList pvalues)
      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

      public static DoubleMatrix1D benjaminiHochberg(DoubleMatrix1D pvalues)
      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

      public static double benjaminiHochbergCut(DoubleArrayList pvalues, double fdr)
      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

      public static double BenjaminiYekuteliCut(DoubleArrayList pvalues, double fdr)
      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

      public static double BonferroniCut(DoubleArrayList pvalues, double fwe)
      Determine the Bonferroni pvalue threshold to maintain the family wise error rate (assuming pvalues are independent).
      Parameters:
      pvalues - The pvalues
      fwe - The family wise error rate
      Returns:
      The minimum pvalue that maintains the FWE