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.
Massively univariate group analysis with permuted OLS.
Tested variates are independently fitted to target variates descriptors (e.g. brain imaging signal) according to a linear model solved with an Ordinary Least Squares criterion. Confounding variates may be included in the model. Permutation testing is used to assess the significance of the relationship between the tested variates and the target variates [1, 2]. A maxtype procedure is used to obtain familywise corrected pvalues.
The specific permutation scheme implemented here is the one of Freedman & Lane [3]. Its has been demonstrated in [1] that this scheme conveys more sensitivity than alternative schemes. This holds for neuroimaging applications, as discussed in details in [2].
Permutations are performed on parallel computing units. Each of them performs a fraction of permutations on the whole dataset. Thus, the max tscore amongst data descriptors can be computed directly, which avoids storing all the computed tscores.
The variates should be given Ccontiguous. target_vars are fortranordered automatically to speedup computations.
Parameters:  tested_vars : arraylike, shape=(n_samples, n_regressors)
target_vars : arraylike, shape=(n_samples, n_descriptors)
confounding_vars : arraylike, shape=(n_samples, n_covars)
model_intercept : bool,
n_perm : int,
two_sided_test : boolean,
random_state : int or None,
n_jobs : int,
verbose: int, optional


Returns:  pvals : arraylike, shape=(n_regressors, n_descriptors)
score_orig_data : numpy.ndarray, shape=(n_regressors, n_descriptors)
h0_fmax : arraylike, shape=(n_perm, )

References