pymare.stats.fdr

fdr(p_values, q=0.05, method='bh')[source]

Perform FDR correction on p values.

Added in version 0.0.4.

Parameters:
  • p_values (numpy.ndarray) – Array of p values.

  • q (float, optional) – Alpha value. Default is 0.05.

  • method ({"bh", "by"}, optional) – Method to use for correction. Either “bh” (Benjamini-Hochberg [1]) or “by” (Benjamini-Yekutieli [2]). Default is “bh”.

Returns:

p_adjusted – Array of adjusted p values.

Return type:

numpy.ndarray

Notes

This function is adapted from statsmodels, which is licensed under a BSD-3 license.

References