dirconn.SurrogateTestResult#
- class dirconn.SurrogateTestResult(observed: Connectivity, pvalues: ndarray, effect: ndarray, zscore: ndarray, null: str, limitations: tuple[str, ...], generator: dict[str, Any], n_surrogates: int, seed: int, alpha: float, checks: AssumptionChecklist)#
Outcome of a surrogate test, with the premise it rests on.
All arrays have the shape of
observed.values,(source, target, freq, time). Cells that are undefined in the observed result (for example the diagonal) are NaN inpvalues,effectandzscore, and are not part of any multiple-comparison family.- observed#
The tested result (after
reduce), with its provenance.- Type:
- pvalues#
(count(|null| >= |observed|) + 1) / (n_surrogates + 1), two-sided on magnitudes. The smallest possible value is1 / (n_surrogates + 1).- Type:
ndarray
- effect#
|observed|minus the mean surrogate magnitude.- Type:
ndarray
- zscore#
effectdivided by the standard deviation (ddof 1) of the surrogate magnitudes; NaN where that is zero or undefined.- Type:
ndarray
- null#
The null hypothesis that the surrogates represent.
- Type:
str
- limitations#
Ways that null can be rejected without coupling between the channels.
- Type:
tuple of str
- generator#
name,nullandparamsof the surrogate generator.- Type:
dict
- n_surrogates, seed, alpha
How the test was run.
alphaonly enters the power check.
- checks#
Diagnostics of the test itself:
surrogate_power,surrogate_generationandsurrogate_fits.- Type:
- __init__(observed: Connectivity, pvalues: ndarray, effect: ndarray, zscore: ndarray, null: str, limitations: tuple[str, ...], generator: dict[str, Any], n_surrogates: int, seed: int, alpha: float, checks: AssumptionChecklist) None#
Methods
__init__(observed, pvalues, effect, zscore, ...)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