dirconn.significance_test#
- dirconn.significance_test(estimator: Estimator, data: TimeSeries, *, test: str, surrogate: SurrogateGenerator | str | None = None, n_surrogates: int | None = None, block_size: int | None = None, seed: int | None = None, reduce: Callable[[Connectivity], Connectivity] | str | Sequence[float] | None = None, alpha: float = 0.05) SurrogateTestResult | AnalyticTestResult | AsymptoticTestResult#
Test the significance of an estimator’s result.
There is no default test: which null hypothesis you test is a choice, and each result states it (
result.null) together with its limitations. Arguments that the chosen test does not use are refused rather than ignored.- Parameters:
estimator (Estimator) – The connectivity estimator.
data (TimeSeries) – Input data.
test ({"surrogate", "block_perm", "analytic"}) –
"surrogate": compare with surrogates fromsurrogate(seedirconn.surrogate_test()); needssurrogate,n_surrogatesandseed."block_perm": block shuffling for continuous data (seedirconn.stats.surrogates.BlockShuffle); needsblock_size,n_surrogatesandseed."analytic": the test that belongs to the estimator’s class, the F test ofGC(dirconn.analytic_gc_test()) or the asymptotic per-frequency tests ofPDCandRPDC(dirconn.analytic_pdc_test(),dirconn.analytic_rpdc_test()); takes no other test arguments.surrogate (SurrogateGenerator or str, optional) – A generator instance, or the name of one that needs no parameters:
"phase_randomize","aaft","iaaft","circular_shift","trial_shuffle".n_surrogates (int, optional) – Number of surrogates.
block_size (int, optional) – Block length in samples for
"block_perm".seed (int, optional) – Seed of the random generators; required by the two resampling tests.
reduce (callable, str or (float, float), optional) – Defines the tested family for the resampling tests (see
dirconn.surrogate_test()).alpha (float) – Default level for
result.significant()and the power check.
- Returns:
All offer
pvalues,null,limitations,adjusted()andsignificant().- Return type:
SurrogateTestResult, AnalyticTestResult or AsymptoticTestResult