Cluster based correction in nistats / nilearn

Hi everyone,

I’ve been using nilearn (nistats) to run some straight forward GLM analyses post fmriprep. Generally speaking this has been a pleasant experience! I’ve come to the stage of wanting to conduct some typical cluster-based stats and I have realized that nilearn doesn’t really compute cluster based inference in the same way that FSL or SPM do (see Nilearn: Statistical Analysis for NeuroImaging in Python — Machine learning for NeuroImaging). My understanding (which could be wrong!) is that nilearn performs a voxel level correction (e.g., fdr) and then cleans up the image by removing any voxel clusters below the given threshold. This is different to the classic FWE correction which compares the size of the resulting clusters after the given arbitrary threshold. Is that correct?

If yes, does it seem reasonable to enter nilearn generated first level estimates (COPES in FSL-speak) into e.g., FSL or SPM to use a cluster-based correction tool? For example, the randomise function in FSL seems appropriate.

Likewise, is there a reason nilearn hasn’t included such functionality - perhaps they consider it bad practice?

Thanks for any input!

edit: There is also this tool that performs probabilistic TFCE that could potentially be applied directly to nilearn outputs: 3. R package · spisakt/pTFCE Wiki · GitHub


Did you find any cluster correction that is easy to use with nilearn?

I’ll just note that @tsalo has been actively working on adding in TFCE-based correction !