Computes Inter-Trial Coherence (also known as phase-locking factor or phase-locking value) for epoched (3D) EEG data. ITC measures the consistency of oscillatory phase across trials at each time-frequency point. Values range from 0 (completely random phase) to 1 (perfectly phase-locked across all trials).
Arguments
- x
A PhysioExperiment object with epoched (3D) EEG data (time x channels x epochs).
- frequencies
Numeric vector of frequencies in Hz to analyze. If
NULL, defaults toseq(1, 50, by = 1).- n_cycles
Number of cycles for the Morlet wavelet (default: 7).
- assay_name
Name of the input assay. If
NULL, the default assay is used.- output_assay
Name the result is stored under. Despite the argument's name this is a key in
metadata, NOT an assay: after the callassay(x, "the value given")does not exist whilemetadata(x)$the value givenholds the result (default:"the value given"). (default:"itc").
Value
Modified PhysioExperiment with:
3D ITC array (time x frequencies x channels) in
output_assay, values in[0, 1]Frequency vector and parameters in
metadata(x)$itc, a list containingfrequencies(numeric vector),n_cycles(integer), andn_epochs(integer)
References
Tallon-Baudry, C., et al. (1997). Oscillatory gamma-band activity during conscious perception. Trends in Cognitive Sciences, 3(4), 151-162.
Makeig, S. (1993). Auditory event-related dynamics of the EEG spectrum and effects of exposure to tones. Electroencephalography and Clinical Neurophysiology, 86(4), 283-293.
Examples
pe <- make_eeg_erp(n_epochs = 20, n_channels = 2, sr = 250)
pe_itc <- eegITC(pe, frequencies = seq(5, 30, by = 5))
# results are stored in metadata(x)$itc
str(S4Vectors::metadata(pe_itc)$itc, max.level = 1)
#> List of 3
#> $ frequencies: num [1:6] 5 10 15 20 25 30
#> $ n_cycles : num 7
#> $ n_epochs : int 20