nimare.correct
.FWECorrector
- class FWECorrector(method='bonferroni', **kwargs)[source]
Bases:
Corrector
Perform family-wise error rate correction on a meta-analysis.
- Parameters
method (
str
) – The FWE correction to use. Available internal methods are ‘bonferroni’. Additional methods may be implemented within the provided Estimator.**kwargs – Keyword arguments to be used by the FWE correction implementation.
Notes
This corrector supports a small number of internal FWE 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_fwe_montecarlo()
).Methods
Perform Bonferroni FWE correction.
inspect
(result)Identify valid 'method' values for a MetaResult object.
transform
(result)Apply the multiple comparisons correction method to a MetaResult object.
- correct_fwe_bonferroni(p)[source]
Perform Bonferroni FWE correction.
This correction is based on the one described in Bonferroni1 and Shaffer2.
Warning
Do not call this method directly. Call
transform()
withmethod='bonferroni'
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
See also
nimare.stats.bonferroni
- 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