Skip to content

fieldtrip/contrib-nonlinearassociation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Nonlinear Association

This MATLAB function calculates a nonlinear association coefficient between pairs of MEG (or EEG) sensors as a function of time delay. Unlike coherence or cross-correlation, this method detects both linear and nonlinear relationships.

This code has been implemented in 2007 by Inge Westmijse for a project investigating absence epilepsy in children with MEG, under the supervision of Gilles van Luijtelaar and Pauly Ossenblok.

Core Principle

It estimates a nonlinear regression curve from a scatterplot of two signals (Y vs. X).

The data is divided into segments, each fitted with a linear regression line.

The association strength is quantified by the correlation ratio h² (ranging from 0 = independent to 1 = fully determined). For linear relationships, h² equals the squared Pearson correlation coefficient r².

By shifting the signals relative to each other, h² is calculated across different time lags to estimate the optimal delay between signals.

Use

The input to the ft_nonlinearassociation function consists of a data structure (e.g., obtained from ft_preprocessing) and a configuration structure cfg (see below). The output is a structure containing the computed nonlinear association values.

The key configuration options include:

cfg.channel    – Channel selection (default: all).
cfg.keeptrials – Whether to process individual trials or concatenated data (default: no).
cfg.trials     – Selection of trials (default: all).
cfg.fsample    – Sampling frequency (default: 1200 Hz).
cfg.maxdelay   – Maximum time shift (default: 32/fsample seconds).
cfg.delaystep  – Step size for shifting (default: 2/fsample seconds).
cfg.nr_bins    – Number of bins for segmenting data (default: 7).
cfg.timwin     – Epoch/window length (default: 0.2 seconds). Shorter windows improve time resolution; longer windows improve delay estimation accuracy.
cfg.toi        – Times of interest (default: empty).

Choosing the epoch length involves a trade-off between accurate delay/h² estimation (longer epochs) and good time resolution (shorter epochs).

References

The method is based on work by Lopes da Silva et al. (1989) and Pijn et al. (1990), originally developed for EEG analysis and adapted by Inge Westmijse for MEG channel- and source-level timeseries analysis.

  • Lopes da Silva F, Pijn JP, Boeijinga P. (1989) Interdependence of EEG signals: linear vs. nonlinear associations and the significance of time delays and phase shifts. Brain Topogr 2(1-2):9-18, doi: 10.1007/bf01128839.
  • Pijn JP, Vijn PC, Lopes da Silva FH, Van Ende Boas W, Blanes W. (1990) Localization of epileptogenic foci using a new signal analytical approach. Neurophysiol Clin 20(1):1-11, doi: 10.1016/s0987-7053(05)80165-0
  • Inge Westmijse, Pauly Ossenblok, Boudewijn Gunning, Gilles van Luijtelaar. (2009) Onset and propagation of spike and slow wave discharges in human absence epilepsy: A MEG study. Epilepsia 2009 Dec;50(12):2538-48, doi: 10.1111/j.1528-1167.2009.02162.x.

History

2007 - Inge Westmijse implemented this and it was added to FieldTrip 2026 - the code was moved to this separate repository

About

Non-linear association coefficient between pair of channels

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages