statcond#
- statcond(data, *args, **kwargs)#
Compare condition arrays using EEGLAB-style t-tests or ANOVAs.
Python callers pass keywords. Positional name/value pairs are accepted through
parse_key_value_args(), including EEGLAB names such asmode,verbose,returnresamplingarray, andstructoutput.- Parameters:
data (Any) – One- or two-dimensional sequence of condition arrays. The case dimension is the last axis by default.
paired –
"auto","on"/True, or"off"/False.method –
"param","perm", or"bootstrap".modeis the legacy alias and wins when it is non-empty.naccu – Number of surrogate samples for nonparametric methods.
variance –
"homogenous"or"inhomogenous"for unpaired t-tests. The default is Welch’s inhomogenous variance, matching EEGLABfinputcheckinstatcond.m:187.ttest2_cellstill defaults to equal variance, matchingttest2_cell.m:79.forceanova – Use one-way ANOVA instead of a two-condition t-test.
tail – Empirical-tail mode for supplied or computed surrogates.
axis – Axis in each condition array that stores cases.
rng – Optional NumPy generator or seed for the Python resampling stream.
alpha – Optional threshold for confidence intervals and masks.
thresholdis the legacy alias.NaNmeans unset.surrog – Precomputed surrogate statistic array.
stats – Observed statistic to pair with
surrog.return_resampling_array – Return surrogate condition grids instead of computing statistics.
returnresamplingarrayis the EEGLAB name.arraycomp –
True/"on"batches all resamples.False/"off"computes one resample at a time and, withreturn_resampling_array=True, returns one grid as in EEGLAB.verbose –
"on"logs the selected design. The default is"off".structoutput – Accepted for EEGLAB calls. The Python return is still a
StatcondResult; a single MATLAB output is the struct.cluster –
"on"replaces pointwise permutation p-values with cluster extent results for one-way designs. The cluster-forming threshold uses the test degrees of freedom. EEGLAB’sstatcond.m:470callstcdf(-abs(surrogval), size(surrogval,1))andstatcond.m:490callstcdf(-abs(ori_vals), length(ori_vals)), so both thresholds use the feature count. That degrees-of-freedom choice is not reproduced.args (Any)
kwargs (Any)
- Returns:
A
StatcondResult, or aSurrogateDistributionwhenreturn_resampling_arrayis true. Computed two-way result fields use namedrows,columns, andinteractioneffects in that order for both paired and unpaired designs. MATLAB-shaped copies live onmatlab_stat,matlab_df,matlab_pvalue, andmatlab_surrogate. Unpaired two-way MATLAB cells are stored in column, row, interaction order.- Return type:
StatcondResult | SurrogateDistribution