eelbrain.test.TTestIndependent

class eelbrain.test.TTestIndependent(y, x, c1=None, c0=None, match=None, sub=None, ds=None, tail=0)

Independent 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.

  • With y and x supplying data for the two conditions.

Parameters
  • y (Var) – Dependent variable.

  • x (categorial) – Model containing the cells which should be compared.

  • c1 (str | tuple | None) – Test condition (cell of x). c1 and c0 can be omitted if x 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 and should be averaged over (e.g. ‘subject’ in a between-group comparison).

  • sub (index-array) – 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, default); 1: upper tail (one-tailed); -1: lower tail (one-tailed).

Variables
  • t (float) – T-value.

  • p (float) – P-value.

  • tail (0 | 1 | -1) – Tailedness of the p value.

  • df (int) – Degrees of freedom.

Methods