eelbrain.Celltable
- class eelbrain.Celltable(y, x=None, match=None, sub=None, cat=None, data=None, coercion=<function asdataobject>, dtype=None)[source]
Divide y into cells defined by x.
- Parameters:
y (eelbrain._data_obj.Var | eelbrain._data_obj.NDVar) – dependent measurement
x (eelbrain._data_obj.Factor | eelbrain._data_obj.Interaction) – Model (Factor or Interaction) for dividing y.
match (eelbrain._data_obj.Factor | eelbrain._data_obj.Interaction) – Factor on which cases are matched (i.e. subject for a repeated measures comparisons). If several data points with the same case fall into one cell of x, they are combined using match_func. If match is not None, Celltable.groups contains the {Xcell -> [match values of data points], …} mapping corres- ponding to self.data
sub (numpy.ndarray) – Bool array of length N specifying which cases to include
cat (Sequence[str | tuple[str, ...]]) – Only retain data for these cells. Data will be sorted in the order of cells occuring in cat.
data (dict) – If a Dataset is specified, input items (y / x / match / sub) can be str instead of data-objects, in which case they will be retrieved from the Dataset.
coercion (Callable) – Function to convert the y parameter to to the dependent varaible (default: asdataobject).
dtype (dtype) – If specified,
ywill be converted to this type.
Examples
Split a repeated-measure variable y into cells defined by the interaction of A and B:
>>> c = Celltable(y, A % B, match=subject)
- y
yafter evaluating input parameters.
- x
xafter evaluating input parameters.
- match
matchafter evaluating input parameters.
- sub
Boolean array;
subafter evaluating input parameters.- Type:
- \*\*If ``match`` is specified**
- within
Dictionary that specifies for each cell pair whether the corresponding comparison is a repeated-measures or an independent measures comparison (only available when the input argument
matchis specified.- Type:
Methods
|
Produce a str label for a cell. |
|
Return a list of all cell names as strings. |
|
Retrieve data for a cell, allowing advanced cell combinations |
|
|
|
Return a list with |
|
Return a |
|
Variability measure |