Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.

nilearn.glm.fdr_threshold

nilearn.glm.fdr_threshold(z_vals, alpha)[source]

Return the Benjamini-Hochberg FDR threshold for the input z_vals.

Parameters:
z_valsarray

A set of z-variates from which the FDR is computed.

alphafloat

The desired FDR control.

Returns:
thresholdfloat

FDR-controling threshold from the Benjamini-Hochberg procedure.

Examples

>>> import numpy as np
>>> from nilearn.glm import fdr_threshold
>>> z_vals = np.array([4.0, 3.5, 2.8, 2.5, 1.9, 1.2])
>>> float(np.round(fdr_threshold(z_vals, alpha=0.05), 2))
1.9