dirconn.ContrastResult#

class dirconn.ContrastResult(observed_a: Connectivity, observed_b: Connectivity, pvalues: ndarray, effect: ndarray, zscore: ndarray, null: str, limitations: tuple[str, ...], n_permutations: int, seed: int, alpha: float, n_trials_a: int, n_trials_b: int, checks: AssumptionChecklist, paired: bool = False)#

Outcome of a condition contrast, with the premise it rests on.

All arrays have the shape of observed_a.values. Cells that are undefined in either condition are NaN and are not part of any multiple-comparison family.

observed_a, observed_b

The estimates for each condition (after reduce).

Type:

Connectivity

pvalues#

(count(|null difference| >= |observed difference|) + 1) / (n_permutations + 1).

Type:

ndarray

effect#

Observed difference |a| - |b|.

Type:

ndarray

zscore#

effect minus the mean permutation difference, over its standard deviation (ddof 1); NaN where that is zero or undefined.

Type:

ndarray

null#

The null hypothesis.

Type:

str

limitations#

Ways the null can be rejected without a change in coupling.

Type:

tuple of str

n_permutations, seed, alpha, n_trials_a, n_trials_b

How the test was run.

checks#

permutation_power, permutation_count and contrast_fits.

Type:

AssumptionChecklist

paired#

Whether the two data sets are two segments of the same trials (segments swapped within trials) rather than two groups of trials.

Type:

bool

__init__(observed_a: Connectivity, observed_b: Connectivity, pvalues: ndarray, effect: ndarray, zscore: ndarray, null: str, limitations: tuple[str, ...], n_permutations: int, seed: int, alpha: float, n_trials_a: int, n_trials_b: int, checks: AssumptionChecklist, paired: bool = False) → None#

Methods

__init__(observed_a, observed_b, pvalues, ...)

adjusted([method])

Return the p-values adjusted over the family (see adjust_pvalues()).

significant([alpha, method])

Return a boolean mask of the cells that survive correction.

Attributes

antisymmetric

Whether the tested method is antisymmetric (MethodInfo.antisymmetric).

defined

Boolean mask of the cells that have a p-value.

method

Name of the estimator.

paired

observed_a

observed_b

pvalues

effect

zscore

null

limitations

n_permutations

seed

alpha

n_trials_a

n_trials_b

checks