- class eelbrain.testnd.TContrastRelated(y, x, contrast, match=None, sub=None, ds=None, tail=0, samples=10000, pmin=None, tmin=None, tfce=False, tstart=None, tstop=None, parc=None, force_permutation=False, **criteria)
Mass-univariate contrast based on t-values
y (NDVar) – Dependent variable.
x (categorial) – Model containing the cells which are compared with the contrast.
contrast (str) – Contrast specification: see Notes.
match (Factor) – Match cases for a repeated measures test.
sub (index) – Perform the test with a subset of the data.
ds (Dataset) – If a Dataset is specified, all data-objects can be specified as names of Dataset variables.
tail (0 | 1 | -1) – Which tail of the t-distribution to consider: 0: both (two-tailed); 1: upper tail (one-tailed); -1: lower tail (one-tailed).
samples (int) – Number of samples for permutation test (default 10,000).
pmin (None | scalar (0 < pmin < 1)) – Threshold for forming clusters: use a t-value equivalent to an uncorrected p-value for a related samples t-test (with df = len(match.cells) - 1).
tmin (scalar) – Threshold for forming clusters as t-value.
tfce (bool | scalar) – Use threshold-free cluster enhancement. Use a scalar to specify the step of TFCE levels (for
tfce is True, 0.1 is used).
tstart (scalar) – Start of the time window for the permutation test (default is the beginning of
tstop (scalar) – Stop of the time window for the permutation test (default is the end of
parc (str) – Collect permutation statistics for all regions of the parcellation of this dimension. For threshold-based test, the regions are disconnected.
force_permutation (bool) – Conduct permutations regardless of whether there are any clusters.
min... – Minimum cluster size criteria:
minfollowed by the simension name, for example:
mintime=0.050for minimum duration of 50 ms;
minsource=10to require at least 10 sources;
minsensor=10to requre at least 10 sensors).
Information on the different permutation methods
A contrast specifies the steps to calculate a map based on t-values. Contrast definitions can contain:
<and data cells to compute t-maps. For example,
"cell1 > cell0"will compute a t-map of the comparison if
cell0, being positive where
cell1is greater than
cell0and negative where
cell0is greater than
cell1. If the data is defined based on an interaction, cells are specified with
"a1 | b1 > a0 | b0". Cells can contain
*to average multiple cells. Thus, if the second factor in the model has cells
"a1 | * > a0 | *"would compare
Unary numpy functions
"abs(cell1 > cell0)".
Binary numpy functions
Numpy functions for multiple arrays
min(a>d, b>d, c>d).
Cases with zero variance are set to t=0.
To find cluster where both of two pairwise comparisons are reliable, i.e. an intersection of two effects, one could use
"min(a > c, b > c)".
To find a specific kind of interaction, where a is greater than b, and this difference is greater than the difference between c and d, one could use
"(a > b) - abs(c > d)".
Retrieve a specific cluster as NDVar
Compute a probability map
Find significant regions or clusters
Find peaks in a threshold-free cluster distribution
List with information about the test
Create a copy of the parameter map masked by significance