Statistics#

EEGPrep statistics helpers mirror the useful parts of EEGLAB’s functions/statistics package while using explicit NumPy contracts. Unless noted otherwise, condition arrays use their final axis for cases, subjects, or surrogate replications.

Condition Tests#

eegprep.functions.statistics.statcond(data, *)

Compare condition arrays using EEGLAB-style t-tests or ANOVAs.

eegprep.functions.statistics.ttest_cell(a[, ...])

Compute paired t-statistics across the case axis.

eegprep.functions.statistics.ttest2_cell(a)

Compute unpaired t-statistics across the case axis.

eegprep.functions.statistics.anova1_cell(data, *)

Compute one-way unpaired ANOVA F-statistics across condition arrays.

eegprep.functions.statistics.anova1rm_cell(data, *)

Compute one-way repeated-measures ANOVA F-statistics.

eegprep.functions.statistics.anova2_cell(data, *)

Compute balanced two-way unpaired ANOVA F-statistics.

eegprep.functions.statistics.anova2rm_cell(data, *)

Compute two-way repeated-measures ANOVA F-statistics.

Multiple Comparisons and Surrogates#

eegprep.functions.statistics.fdr(pvals[, q, ...])

Compute Benjamini-Hochberg or Benjamini-Yekutieli FDR thresholds.

eegprep.functions.statistics.stat_surrogate_pvals(...)

Compute empirical p-values against a surrogate distribution.

eegprep.functions.statistics.stat_surrogate_ci(...)

Compute surrogate confidence intervals along the last axis.

eegprep.functions.statistics.surrogdistrib(data, *)

Build bootstrap or permutation surrogate condition grids.

Data Helpers#

eegprep.functions.statistics.concatdata(data, *)

Concatenate condition arrays along their case axis.

eegprep.functions.statistics.corrcoef_cell(a)

Compute pairwise correlations along a case axis.

eegprep.functions.statistics.teststat([seed])

Run deterministic smoke checks for the EEGPrep statistics package.