frites.workflow.WfStats#
- class frites.workflow.WfStats(verbose=None)[source]#
Workflow of non-parametric statistics for electropĥysiological data.
The goal of this workflow is to provide an interface for assessing non- parametric statistics on electrophysiological data based on anatomical informations (ROI = Region Of Interest). In particular, it allows to make inferences either about a specific population (FFX = fixed effect) or build a model of a random population (RFX = Random effect). In addition, significant effect can either be detected at the spatio-temporal level (i.e at each time point and for each ROI) either at the cluster-level (i.e temporal clusters).
- Attributes
cluster_th
Cluster forming threshold.
Methods
fit
(effect, perms[, inference, mcp, tail, ...])Fit the workflow on true data.
clean
- property cluster_th#
Cluster forming threshold.
- fit(effect, perms, inference='rfx', mcp='cluster', tail=1, cluster_th=None, cluster_alpha=0.05, ttested=False, rfx_sigma=0.001, rfx_center=False)[source]#
Fit the workflow on true data.
- Parameters
- effect
python:list
True effect list of length (n_roi,) composed of arrays each one of shape (n_subjects, …, n_times). Number of subjects per ROI could be different
- perms
python:list
Permutation list of length (n_roi,) composed of arrays each one of shape (n_perm, n_subjects, …, n_times). Number of subjects per ROI could be different
- inference{‘ffx’, ‘rfx’}
Perform either Fixed-effect (‘ffx’) or Random-effect (‘rfx’) inferences. By default, random-effect is used
- mcp{‘cluster’, ‘maxstat’, ‘fdr’, ‘bonferroni’, ‘nostat’,
python:None
} Method to use for correcting p-values for the multiple comparison problem. Use either :
‘cluster’ : cluster-based statistics [default]
‘maxstat’ : test-wise maximum statistics correction
‘fdr’ : test-wise FDR correction
‘bonferroni’ : test-wise Bonferroni correction
‘nostat’ : permutations are computed but no statistics are performed
‘noperm’ / None : no permutations are computed
- tail{-1, 0, 1}
Type of comparison. Use -1 for the lower part of the distribution, 1 for the higher part and 0 for both. By default, upper tail of the distribution is used
- cluster_th
python:str
,python:float
|python:None
The threshold to use for forming clusters. Use either :
a float that is going to act as a threshold
None and the threshold is automatically going to be inferred using the distribution of permutations
‘tfce’ : for Threshold Free Cluster Enhancement
- cluster_alpha
python:float
| 0.05 Control the percentile to use for forming the clusters. By default the 95th percentile of the permutations is used.
- ttestedbool |
python:False
Specify if the inputs have already been t-tested
- rfx_sigma
python:float
| 0.001 Hat adjustment method, a value of 1e-3 may be a reasonable choice
- rfx_center{
python:False
, ‘mean’, ‘median’, ‘trimmed’, ‘zscore’} Re-center the time-series of effect arround 0 before computing the t-test. This parameters can be useful in case of a different number of data per brain region.
- effect
- Returns
- pvaluesnumpy:array_like
Array of p-values of shape (…, n_times, n_roi)
- tvaluesnumpy:array_like
Array of t-values of shape (…, n_times, n_roi). This ouput is only computed for group-level analysis
References
Smith and Nichols, 2009 [18]