Moving the conversation from Brainhack Discord server

@Assunta asked on 21st June 14:21:

Hello Nilearn experts,

I have a few questions about the implementation of the permute_ols function and TFCE correction. The first regards the computation of the FWE corrected p-values. Is your implementation equivalent to a maximum statistics? i.e., the p-values are computed from the distribution of maximum t-values obtained at each permutation step?

Gonsidering this note in the function:

‘’’`tested_vars : array-like, shape=(n_samples, n_regressors) Explanatory variates, fitted and tested independently from each others.`

‘’’

Is it the OLS implementation equivalent to the pseudo-inverse? Why are the tested variables fitted separately instead of building a full model including all predictors and covariates?

Regarding the building of a design matrix, in case I have N subjects and M conditions per subject and I want to build a random effect model, shall I create M dummy predictors for the conditions and add N-1 dummy predictors as covariates for the subject random effect?

@bthirion responded on 22nd June 10:19:

Is your implementation equivalent to a maximum statistics? i.e., the p-values are computed from the distribution of maximum t-values obtained at each permutation step? → Yes

Regarding the next question, what is computed amounts to considering different models, each one with a different tested_var

I think that it is possible to add covariates as much as needed.

@Assunta asked on 22nd June 10:27:

So in my case ( I have N subjects and M conditions per subject and I want to build a random effect model) I would like to build a model that considers the tested vars all together, so from what you said that is not what’s currently implemented. Did I understand correctly?

Additionally I was wondering whether your tfce implemetation was compared to the FSL one. Many thanks

Awaiting you response to last questions @bthirion. Thanks!