eelbrain.test.TTestRel¶
-
class
eelbrain.test.
TTestRel
(y: Union[eelbrain._data_obj.Var, str], x: Union[eelbrain._data_obj.Factor, eelbrain._data_obj.Interaction, eelbrain._data_obj.NestedEffect, str, eelbrain._data_obj.Var], c1: Union[str, Tuple[str, ...]] = None, c0: Union[str, Tuple[str, ...]] = None, match: Union[eelbrain._data_obj.Factor, eelbrain._data_obj.Interaction, eelbrain._data_obj.NestedEffect, str] = None, sub: Union[eelbrain._data_obj.Var, numpy.ndarray, str] = None, ds: eelbrain._data_obj.Dataset = None, tail: int = 0)¶ Related-measures t-test
The test data can be specified in two forms:
- In long form, with
y
supplying the data,x
specifying condition for each case andmatch
determining which cases are related. - In wide/repeated measures form, with
y
andx
both supplying data with matching case order.
Parameters: - y : Var
Dependent variable. Alternatively, the first of two variables that are compared.
- x : categorial
Model containing the cells which should be compared. Alternatively, the second of two varaibles that are compared.
- c1 : str | tuple | None
Test condition (cell of
x
).c1
andc0
can be omitted ifx
only contains two cells, in which case cells will be used in alphabetical order.- c0 : str | tuple | None
Control condition (cell of
x
).- match : categorial
Units within which measurements are related (e.g. ‘subject’ in a within-subject comparison). If match is unspecified, it is assumed that
y
andx
are two measurements with matched cases.- sub : None | index-array
Perform the test with a subset of the data.
- ds : None | 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, default); 1: upper tail (one-tailed); -1: lower tail (one-tailed).
See also
WilcoxonSignedRank
- non-parametric alternative
Attributes: - t : float
T-value.
- p : float
P-value.
- tail : 0 | 1 | -1
Tailedness of the p value.
- difference : Var
Difference values.
- df : int
Degrees of freedom.
- c1_mean : float
Mean of condition
c1
.- c0_mean : float
Mean of condition
c0
.
- In long form, with