eelbrain.testnd.TTestOneSample

class eelbrain.testnd.TTestOneSample(y, popmean=0, 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)[source]

Mass-univariate one sample t-test

Parameters:
  • y (NDVar | str) – Dependent variable.

  • popmean (float) – Value to compare y against (default is 0).

  • match (Factor | Interaction | NestedEffect | str) – Combine data for these categories before testing.

  • sub (Var | ndarray | str) – Perform test with a subset of the data.

  • data (Dataset) – If a Dataset is specified, all data-objects can be specified as names of Dataset variables

  • tail (Literal[-1, 0, 1]) – Which tail of the t-distribution to consider: 0: both (two-tailed); 1: upper tail (one-tailed); -1: lower tail (one-tailed).

  • samples (int) – Number of samples for permutation test (default 10,000).

  • pmin (float) – Threshold for forming clusters (0 < pmin < 1): use a t-value equivalent to an uncorrected p-value.

  • tmin (float) – Threshold for forming clusters as t-value.

  • tfce (float | bool) – Use threshold-free cluster enhancement. Use a scalar to specify the step of TFCE levels (for tfce is True, 0.1 is used).

  • tstart (float) – Start of the time window for the permutation test (default is the beginning of y).

  • tstop (float) – 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 threshold-based test, the regions are disconnected.

  • force_permutation (bool) – Conduct permutations regardless of whether there are any clusters.

  • mintime (float) – Minimum duration for clusters (in seconds).

  • minsource (int) – Minimum number of sources per cluster.

clusters

For cluster-based tests, a table of all clusters. Otherwise a table of all significant regions (or None if permutations were omitted). See also the find_clusters() method.

Type:

eelbrain._data_obj.Dataset

difference

The difference value entering the test (y if popmean is 0).

Type:

eelbrain._data_obj.NDVar

n

Number of cases.

Type:

int

p

Map of p-values corrected for multiple comparison (or None if no correction was performed).

Type:

eelbrain._data_obj.NDVar

p_uncorrected

Map of p-values uncorrected for multiple comparison.

Type:

eelbrain._data_obj.NDVar

t

Map of t-values.

Type:

eelbrain._data_obj.NDVar

tfce_map

Map of the test statistic processed with the threshold-free cluster enhancement algorithm (or None if no TFCE was performed).

Type:

eelbrain._data_obj.NDVar

See also

testnd

Information on the different permutation methods

Notes

Data points with zero variance are set to t=0.

Methods

cluster(cluster_id)

Retrieve a specific cluster as NDVar

compute_probability_map(**sub)

Compute a probability map

find_clusters([pmin, maps])

Find significant regions or clusters

find_peaks()

Find peaks in a threshold-free cluster distribution

info_list([computation])

List with information about the test

masked_difference([p, name])

Difference map masked by significance

masked_parameter_map([pmin])

Statistical parameter map masked by significance