eelbrain.testnd.LM
- class eelbrain.testnd.LM(y, x, sub=None, data=None, coding='dummy', subject=None, samples=10000, pmin=None, tmin=None, tfce=False, tstart=None, tstop=None, force_permutation=False, **criteria)
Fixed effects linear model
- Parameters
x (Union[Model, Var, Factor, Interaction, NestedEffect, str]) – Model to fit.
data (Dataset) – Optional Dataset providing data for y/model.
coding (Literal['dummy', 'effect']) – Model parametrization (default is dummy coding). Vars are centered for effect coding (but not for dummy coding).
subject (str) – Optional information used by
LMGroup
; if subject is a column inds
it will be extracted automatically.samples (int) – Number of samples for permutation test (default 10,000).
pmin (float) – Threshold for forming clusters: use a t-value equivalent to an uncorrected p-value.
tmin (float) – Threshold for forming clusters as t-value.
tfce (Union[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
).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.
See also
Examples
See Two-stage test example.
Notes
By default, this model generates a permutation distribution to correct for multiple comparisons. This is not needed for a two-stage model, where correction occurs at the group level. When fitting two-stage models, set
samples=0
to skip this and save time.This class stores a shallow copy of
y.info
(for predicting).
Methods
|
Retrieve a specific cluster as NDVar |
|
|
|
Compute a probability map |
|
Find significant regions or clusters |
Find peaks in a TFCE distribution |
|
|
List with information about the test |
|
Statistical parameter map masked by significance |
|
Predict |
|
|