eelbrain.testnd.t_contrast_rel¶

class
eelbrain.testnd.
t_contrast_rel
(y: Union[eelbrain._data_obj.NDVar, str], x: Union[eelbrain._data_obj.Factor, eelbrain._data_obj.Interaction, eelbrain._data_obj.NestedEffect, str], contrast: str, match: Union[eelbrain._data_obj.Factor, eelbrain._data_obj.Interaction, eelbrain._data_obj.NestedEffect, str] = None, sub: Union[eelbrain._data_obj.Factor, eelbrain._data_obj.Interaction, eelbrain._data_obj.NestedEffect, str] = None, ds: eelbrain._data_obj.Dataset = None, tail: int = 0, samples: int = 10000, pmin: float = None, tmin: float = None, tfce: Union[float, bool] = False, tstart: float = None, tstop: float = None, parc: str = None, force_permutation: bool = 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.
 ds : None  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.
 mintime : scalar
Minimum duration for clusters (in seconds).
 minsource : int
Minimum number of sources per cluster.
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¶
cluster (self, cluster_id) 
Retrieve a specific cluster as NDVar 
compute_probability_map (self, **sub) 
Compute a probability map 
find_clusters (self[, pmin, maps]) 
Find significant regions or clusters 
find_peaks (self) 
Find peaks in a thresholdfree cluster distribution 
info_list (self[, computation]) 
List with information about the test 
masked_parameter_map (self[, pmin]) 
Create a copy of the parameter map masked by significance 