eelbrain.testnd.TContrastRelated
 class eelbrain.testnd.TContrastRelated(y, x, contrast, match=None, sub=None, data=None, tail=0, samples=10000, pmin=None, tmin=None, tfce=False, tstart=None, tstop=None, parc=None, force_permutation=False, **criteria)
Massunivariate contrast based on tvalues
 Parameters
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.
data (Dataset) – If a Dataset is specified, all dataobjects can be specified as names of Dataset variables.
tail (0  1  1) – Which tail of the tdistribution to consider: 0: both (twotailed); 1: upper tail (onetailed); 1: lower tail (onetailed).
samples (int) – Number of samples for permutation test (default 10,000).
pmin (None  scalar (0 < pmin < 1)) – Threshold for forming clusters: use a tvalue equivalent to an uncorrected pvalue for a related samples ttest (with df = len(match.cells)  1).
tmin (scalar) – Threshold for forming clusters as tvalue.
tfce (bool  scalar) – Use thresholdfree 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
y
).tstop (scalar) – Stop of the time window for the permutation test (default is the end of
y
).parc (str) – Collect permutation statistics for all regions of the parcellation of this dimension. For thresholdbased test, the regions are disconnected.
force_permutation (bool) – Conduct permutations regardless of whether there are any clusters.
min... – Minimum cluster size criteria:
min
followed by the simension name, for example:mintime=0.050
for minimum duration of 50 ms;minsource=10
to require at least 10 sources;minsensor=10
to requre at least 10 sensors).
See also
testnd
Information on the different permutation methods
Notes
A contrast specifies the steps to calculate a map based on tvalues. Contrast definitions can contain:
Comparisons using
>
or<
and data cells to compute tmaps. For example,"cell1 > cell0"
will compute a tmap of the comparison ifcell1
andcell0
, being positive wherecell1
is greater thancell0
and negative wherecell0
is greater thancell1
. If the data is defined based on an interaction, cells are specified with
, e.g."a1  b1 > a0  b0"
. Cells can contain*
to average multiple cells. Thus, if the second factor in the model has cellsb1
andb0
,"a1  * > a0  *"
would comparea1
toa0
while averagingb1
andb0
withina1
anda0
.Unary numpy functions
abs
andnegative
, e.g."abs(cell1 > cell0)"
.Binary numpy functions
subtract
andadd
, e.g."add(a>b, a>c)"
.Numpy functions for multiple arrays
min
,max
andsum
, e.g.min(a>d, b>d, c>d)
.
Cases with zero variance are set to t=0.
Examples
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)"
.
Methods

Retrieve a specific cluster as NDVar 

Compute a probability map 

Find significant regions or clusters 
Find peaks in a thresholdfree cluster distribution 


List with information about the test 

Statistical parameter map masked by significance 