All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.monarchinitiative.phenol.stats.mtc.BenjaminiHochberg Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
package org.monarchinitiative.phenol.stats.mtc;


import org.monarchinitiative.phenol.stats.PValue;

import java.util.Collections;
import java.util.List;

/**
 *
 * This class implements the BenjaminiHochberg multiple test
 * correction. It controls the FDR for independent and positive
 * regression dependent test statistics.
 *
 * The formula for p value adjustment is:
 *    adjusted-p-value = p-value * (n/n-rank),
 * with n being the number of p-values (tests) and rank being
 * the p-value's corresponding rank. Here rank starts at 0
 * whereby the highest p-value has the smallest rank (sorted
 * descreasingly).
 *
 * @author Sebastian Bauer
 *
 */
public class BenjaminiHochberg implements MultipleTestingCorrection
{
  @Override
  public void adjustPvals(List pvals) {
    Collections.sort(pvals);
    int N=pvals.size();
    for (int r=0;r




© 2015 - 2024 Weber Informatics LLC | Privacy Policy