pymare.results.CombinationTestResults

class CombinationTestResults(estimator, dataset, z=None, p=None)[source]

Bases: object

Container for results generated by p-value combination methods.

Parameters:
  • estimator (BaseEstimator) – The estimator used to produce the results.

  • dataset (Dataset) – A Dataset instance containing the inputs to the estimator.

  • z (numpy.ndarray, optional) – Array of z-scores. Default = None.

  • p (numpy.ndarray, optional) – Array of right-tailed p-values. Default = None.

property p

P-values.

permutation_test(n_perm=1000)[source]

Run permutation test.

Warning

This method relies on the .dataset attribute, so the original Estimator must have be fitted with fit_dataset, not fit.

Parameters:

n_perm (int, optional) – Number of permutations to generate. The actual number used may be smaller in the event of an exact test (see below), but will never be larger. Default = 1000.

Returns:

An instance of class PermutationTestResults.

Return type:

PermutationTestResults

Notes

If the number of possible permutations is smaller than n_perm, an exact test will be conducted. Otherwise an approximate test will be conducted by randomly shuffling the outcomes n_perm times (or, for intercept-only models, by randomly flipping their signs). Permuted datasets are processed in parallel. This means that one can often set very high n_perm values (e.g., 100k) with little performance degradation.

property z

Z-values.