nimare.correct
.FDRCorrector
- class FDRCorrector(method='indep', alpha=0.05, **kwargs)[source]
Bases:
Corrector
Perform false discovery rate correction on a meta-analysis.
- Parameters
Notes
This corrector supports a small number of internal FDR correction methods, but can also use special methods implemented within individual Estimators. To determine what methods are available for the Estimator you’re using, use
inspect()
. Estimators have special methods following the naming conventioncorrect_[correction-type]_[method]
(e.g.,correct_fdr_indep
).Methods
Perform Benjamini-Hochberg FDR correction.
Perform Benjamini-Yekutieli FDR correction.
inspect
(result)Identify valid 'method' values for a MetaResult object.
transform
(result)Apply the multiple comparisons correction method to a MetaResult object.
- correct_fdr_indep(p)[source]
Perform Benjamini-Hochberg FDR correction.
This correction is based on the one described in Benjamini and Hochberg1. This method is not universally appropriate. It works well for tests that are independent, or which are positively correlated.
Warning
Do not call this method directly. Call
transform()
withmethod='indep'
instead.New in version 0.0.12.
- Parameters
p (
numpy.ndarray
) – A 1D array of p values.- Returns
A 1D array of adjusted p values.
- Return type
References
- 1
Yoav Benjamini and Yosef Hochberg. Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal statistical society: series B (Methodological), 57(1):289–300, 1995. URL: https://doi.org/10.1111/j.2517-6161.1995.tb02031.x, doi:10.1111/j.2517-6161.1995.tb02031.x.
See also
- correct_fdr_negcorr(p)[source]
Perform Benjamini-Yekutieli FDR correction.
This correction is based on the one described in Benjamini and Yekutieli2. It is most appropriate for tests that are negatively correlated.
Warning
Do not call this method directly. Call
transform()
withmethod='negcorr'
instead.New in version 0.0.12.
- Parameters
p (
numpy.ndarray
) – A 1D array of p values.- Returns
A 1D array of adjusted p values.
- Return type
Notes
The difference between the Benjamini-Yekutieli and Benjamini-Hochberg methods is that Benjamini-Yekutieli includes an additional term,
c(m)
. When the tests are independent or positively correlated,c(m)
is 1 (and thus has no effect). In cases of other forms of dependence,c(m)
has an effect.References
- 2
Yoav Benjamini and Daniel Yekutieli. The control of the false discovery rate in multiple testing under dependency. The Annals of Statistics, 29(4):1165 – 1188, 2001. URL: https://doi.org/10.1214/aos/1013699998, doi:10.1214/aos/1013699998.
See also
- classmethod inspect(result)[source]
Identify valid ‘method’ values for a MetaResult object.
In addition to returning a list of valid values, this method will also print out those values, divided by the value type (Estimator or generic).
- Parameters
result (
MetaResult
) – Object for which valid correction methods (i.e., ‘method’ values) will be identified.- Returns
List of valid ‘method’ values for the Corrector+Estimator combination, including both non-specific methods and Estimator-specific ones.
- Return type
- transform(result)[source]
Apply the multiple comparisons correction method to a MetaResult object.
- Parameters
result (
MetaResult
) – MetaResult generated by an Estimator to be corrected for multiple comparisons.- Returns
result – MetaResult with new corrected maps added.
- Return type