.backtick {font-size: 16px;})>><abbr {font-weight: bold;})>> <em strong {font-weight: normal; font-style: normal; padding: 2px; border-radius: 5px; background-color: #EEE; color: #111;})>>
= Connectivity =
''Authors: Hossein Shahabi, Raymundo Cassani, Takfarinas Medani, François Tadel, Marc Lalancette, [[https://www.neurospeed-bailletlab.org/sylvain-baillet|Sylvain Baillet]]''
Brain functions (e.g., in cognition, behavior and perception) stem from the coordinated activity of multiple regions. [[http://www.scholarpedia.org/article/Brain_connectivity|Brain connectivity]] measures are designed to probe how brain regions (or nodes) interact as a network. A distinction is made between '''structural''' (fiber pathways), '''functional''' (non-directed statistical associations) and '''effective''' (causal interactions, or "directed functional connectivity") connectivity between regions. Here we explain how to compute various connectivity metrics for non-directed and directed functional connectivity analyses with Brainstorm, both with simulated (ground-truth) and empirical data.
We encourage the interested reader to [[https://pubmed.ncbi.nlm.nih.gov/34906715/|learn more]] about the specific aspects of electrophysiology for studying human ''connectomics''.
<>
== Introduction ==
=== Definitions ===
Connectivity analyses are commonly performed by computing a bivariate measure between pairs of regional time series of interest. The outcome (a.k.a a ''connectome'') can be represented as a '''connectivity graph''' (left panel below), with each brain region as a node (x, y, z,...), and the connectivity measures shown above each edge of the graph. The ''connectome ''can also be represented by a '''connectivity array''', a.k.a. an adjacency matrix (right panel below).
{{attachment:cnx_graph_matrix.png}}
'''Sensors or sources:''' The time series used for connectivity analyses can be from '''sensor data''' (EEG/MEG signals) or from '''source time series''' (brain voxels or scouts).
'''Directed vs. non-directed:''' The direction of interactions between signals (as a measure of statistical causation) is estimated with '''directed metrics'''. '''Non-directed metrics '''produce symmetrical connectivity graphs/matrices: the connectivity measure "from Signal <> to Signal <> " is identical to the connectivity measure "from Signal <> to Signal <>".
'''Experimental condition:''' Depending on the neuroscience question, connectivity analyses can be performed on resting-state or task (e.g., ongoing or trial-based) data.
'''Full (NxN) vs. seeded (1xN) connectivity:''' In a '''full connectivity analysis''', the connectivity metric is computed for all the possible pairs of nodes between N time series (noted N×N here). Alternatively, '''seeded connectivity''' (noted 1×N) is measured between one time series of interest (a ''seed, ''e.g., one brain region or a behavioral marker) and N other regions/time series.
'''Time-frequency transformations:''' Some connectivity metrics rely on a [[Tutorials/TimeFrequency|time-frequency representation]] of the signals. These latter are obtained with approaches such as the short-time Fourier transform, Hilbert transform, or Morlet wavelets.
Just as in other areas of electrophysiology studies, connectivity analyses need to be'''guided by mechanistic hypotheses concerning the expected neurophysiological effects'''.
=== Sensor-level analyses ===
1. '''Their anatomical interpretation is limited and ambiguous'''.
1. Sensor data is affected by '''field spread''' and '''volume conduction of brain activity '''across the scalp/sensor array. Hence, activity from one single brain area is picked up at multiple, possibly distant sensor locations. Connectivity measures may show strong interactions between sensor time series, which may be wrongly interpreted as inter-regional brain connections.
=== Source-level analyses ===
Connectivity measures between source time series are '''neuroanatomically interpretable''' and can be derived across participants.
We recommended that the outcomes of sensor and source connectivity analyses are mutually compatible; see ([[https://doi.org/10.1038/s41598-018-30869-w|Lai et al., 2018]]).
'''Full-brain connectomes'''
Whole-brain connectivity analyses at the typical resolution of cortical surfaces in Brainstorm involve '''thousands''' of source locations, making the N×N derivations impractical. For instance, 15000 cortical vertices would yield a connectivity matrix of 15000x15000x8 bytes = 1.6 GB. If unconstrained cortical sources are used and coherence is computed across 50 frequency bins, the memory allocation increases to 45000x45000x50x8 = 754 GB per participant/condition/trial/etc. Reducing the N (via e.g., cortical parcellations, ROIs) may be required for practical reasons, depending on computing resources.
'''Regions of interest'''
Grouping individual brain sources into ROIs, defined on the [[http://Tutorials/Scouts|cortical surface]] or in the brain [[https://neuroimage.usc.edu/brainstorm/Tutorials/TutVolSource#Volume_scouts|volume]] helps contain the computational resources required for connectivity analyses (see above). ROIs can be defined based on neuroscience priors and the purpose of the study ([[https://doi.org/10.1002/hbm.20745|Schhoffen and Gross, 2009]]). You may consider:
* '''Study priors '''from the literature in your field, specific working hypotheses in terms of neuro-anatomical brain structures expected to be involved.
* '''Association with a non-neuronal signal''' (e.g., cortico-muscular coherence).
* '''Signal strength''', by defining ROIs from brain regions with strongest activity in current data.
* '''Whole-brain '''[[https://neuroimage.usc.edu/brainstorm/Tutorials/LabelFreeSurfer#Cortical_parcellations|cortical parcellation]] to reduce N.
The tutorial [[https://neuroimage.usc.edu/brainstorm/Tutorials/CorticomuscularCoherence|Corticomuscular coherence]] explains the computation of connectivity measures '''constrained''' and '''unconstrained''' brain maps for these cases:
1. '''One signal x full-brain source maps''': [[https://neuroimage.usc.edu/brainstorm/Tutorials/CorticomuscularCoherence#Method|link]]
2. '''One signal x scouts''': [[https://neuroimage.usc.edu/brainstorm/Tutorials/CorticomuscularCoherence#Coherence:_EMG_x_Scouts|link]]
3. ROI-based connectomes, i.e., '''scouts x scouts''': [[https://neuroimage.usc.edu/brainstorm/Tutorials/CorticomuscularCoherence#Coherence_Scouts_x_Scouts|link]]
{{{#!wiki note
Studies have reported similarities and differences between electrophysiological connectomes (from MEG/EEG) and fMRI connectomes. See how the '''electrophysiological connectomes provide unique insights on how functional communication is implemented in the brain''' in [[https://doi.org/10.1016/j.neuroimage.2021.118788|Sadaghiani et al., 2022]].
}}}
{{{#!wiki caution
On whole-brain connectivity analyses and the issue of circular analysis, please see [[https://doi.org/10.1038/nn.2303|Kriegeskorte et al., 2009]].
}}}
== Pre-requisites ==
Here we focus on the specifics on connectivity analyses with Brainstorm. Please make sure you are familiar with Brainstorm and go through all [[http://neuroimage.usc.edu/brainstorm/Tutorials#Get_started|introduction tutorials]] first, before following the present tutorial.
We first use simulated, synthetic data to emphasize the theoretical aspects of each connectivity metric with respect to groundtruth outcomes. Real, empirical MEG data are featured later in the tutorial (same auditory oddball dataset as in the other tutorial sections).
Let's start by creating a new protocol in the Brainstorm database:
* Select the menu File > Create new protocol > type in "'''TutorialConnectivity'''" and select the options:
* '''Yes''', use protocol's default anatomy,
* '''No''', use one channel file per condition.
* Right-click on the TutorialConnectivity folder > New subject > Subject01<
><
> {{attachment:protocol_connect.gif}}
== Simulated data ==
To compare connectivity metrics, let's use synthetic time series simulated with known ground truth interactions. We will use a [[https://en.wikipedia.org/wiki/Brain_connectivity_estimators#Multivariate_Autoregressive_Model|multivariate autoregressive (MVAR)]] model that consists of the following three signals:
* '''Signal 1''': two oscillatory (rhythmic) components: One at 10 Hz (alpha band), and a stronger peak at 25 Hz (beta band).
* '''Signal 2''': Same as Signal 1, with the strongest peak at 10 Hz.
* '''Signal 3''': Same as above, with the two components (10 and 25 Hz) of same magnitude.
The 25-Hz component of''' '''Signal 3 will be driven in part by the 25-Hz component of Signal 1 (denoted '''Signal 1>>Signal 3''').
Let's now generate the three time series:
* In the '''Process1''' tab, leave the file list empty and click on the button '''[Run]'''
* Select process: '''Simulate > Simulate AR signals'''.<
><
> {{attachment:sim_process.gif}}
Process options:
* '''Subject name''': Target subject for the simulated signals: Select '''Subject01'''.
* '''Condition name''': Target folder where to store the simulated data in your database: Set to '''Simulation'''.
* '''Number of time samples''' for each simulated time series: Set to '''12,000'''.
* '''Sampling frequency''' (Fs): Set to '''120 Hz'''.
* '''Interaction specifications:''' Spectral parameters for the signal components and their interactions in the MVAR model: '''From, To / Peak frequencies [Hz] / Peak relative magnitudes [0-1]'''<
> Set to:
{{{
1, 1 / 10, 25 / 0.3, 0.5
2, 2 / 10, 25 / 0.7, 0.3
3, 3 / 10, 25 / 0.2, 0.2
1, 3 / 25 / 0.1
}}}
* '''Display the groundtruth spectral metrics''' of the MVAR-generated time series: transfer function, cross-spectral power density, [[#Coherence|magnitude square coherence]], [[https://en.wikipedia.org/wiki/Brain_connectivity_estimators#Directed_Transfer_Function|directed transfer function (DTF)]] and [[https://en.wikipedia.org/wiki/Brain_connectivity_estimators#Partial_Directed_Coherence|partial directed coherence (PDC)]]. The '''transfer function '''(<>) characterizes the relationships between signals in the frequency domain. It is a non-symmetric representation, which enables the identification of causal dependencies between signal components. The ''auto-transfer functions'' (shown in the graphs along the diagonal below) display the power spectra of each signal. The off-diagonal representations display the interactions between each pair of signals (see Signal 1 >> Signal 3 above). Here, we see the transfer function from signal 1 to signal 3. These transfer functions are our '''ground truth for connectivity values'''.<
><
> {{attachment:sim_ar_spectra_metrics.png||width="100%"}}
* '''Get coefficients matrix:''' Shows the coefficients related to the MVAR model. These coefficients can be used in the process '''Simulate > Simulate AR signals (ARfit)''' to simulate the same model.<
><
> {{attachment:sim_coef.gif}}
Execution:
* Click '''Run''' to generate the time series with the MVAR model. <
><
> {{attachment:sim_db.gif}}
* In the next sections, we will compute different connectivity metrics from these synthetic time series. Drag and drop the simulated data in the '''Process1''' tab, click on '''[Run]''' ( {{https://neuroimage.usc.edu/moin_static198/brainstorm1/img/iconRun.gif}} ) to open the [[Tutorials/PipelineEditor#Selecting_processes|Pipeline editor]], and select the connectivity metric.<
><
> {{attachment:sim_select.gif}}
* This tutorial illustrates the computation of full connectivity graphs ('''Process 1: NxN'''). It is also possible to obtain connectivity measures between one of the time series of a given data file and the other time series in the same file (use '''Process1: 1xN'''), or between time series from two different data files (use '''Process2: AxB'''), as shown further below.
References used:
* This process relies on the ARSIM function from the '''ARFit toolbox''': <
>https://github.com/tapios/arfit
* Neumaier A, Schneider T<
>[[http://dx.doi.org/10.1145/382043.382304|Estimation of parameters and eigenmodes of multivariate autoregressive models]]<
>ACM Transactions on Mathematical Software, 2001
* Schneider T, Neumaier A<
>Algorithm 808: [[http://dx.doi.org/10.1145/382043.382316|ARfit – A Matlab package for the estimation of parameters and eigenmodes of multivariate autoregressive models]]<
>ACM Transactions on Mathematical Software, 2001
<
><
>
== Correlation ==
[[https://en.wikipedia.org/wiki/Correlation_and_dependence|Correlation]] is a relatively simple, non-directed connectivity metric of association between two time series. It is relatively limited without further preprocessing of the input time series: correlation is sensitive to volume conduction and is not frequency specific.
=== Process options ===
* Process '''Connectivity > Correlation NxN''':<
><
> {{attachment:gui_corr1n.png}}
* '''Time window:''' Time segment of the signals for connectivity analysis. Select: '''All file'''.
* '''Time resolution:''' Select '''None'''
* '''Windowed:''' correlation is computed in windows of a given '''length''' with a certain '''overlap''' percentage
* '''None:''' correlation is computed using the entire time series
* '''Compute scalar product:''' If left unchecked, the mean of the time series is subtracted before computing the correlation. Leave it unchecked.
* '''Output options''': Select Estimate and save '''separately for each file'''.
=== Result visualization ===
* The results are stored as a N×N connectivity file, with a new icon {{https://neuroimage.usc.edu/moin_static198/brainstorm1/img/iconConnectN.gif}} . Right-click for display options:<
><
> {{attachment:corr1n_file.gif}}
* '''Display as graph''': Plots the connectivity graph using a [[https://en.wikipedia.org/wiki/Chord_diagram|chord diagram]] where the color of the edges shows the value of the connectivity metric. See the [[Tutorials/ConnectivityGraph|connectivity graph tutorial]] for a detailed explanation of the options of this visualization.
* '''Display as image''': Plots the connectivity measures in an [[https://en.wikipedia.org/wiki/Adjacency_matrix|adjacency matrix]].
* '''Display fibers''': Displays source connectivity edges as virtual white fiber tracts, as shown [[#Tutorials.2FFiberConnectivity|here]]. <
><
> {{attachment:corr1n_graph_image.png}}
Display options:
* '''Show labels''': Click on the figure to display the names of the times series and the connectivity values in the figure legend. To display the labels corresponding to each column and row: right-click on the figure > Figure > '''Show labels'''. If the time series names are too long, use the option '''Use short labels'''.
* '''Hide self-connectivity''': In a square NxN connectivity matrix, the diagonal values correpond to the values of the connectivity metric between a time series and itself. These self-connectivity values are typically much higher than the other values of the matrix. When checked, these values are hidden so that to display the off-diagonal values more clearly.
* '''Colormap''': By default, the NxN colormap is configured to display the absolute values of the connectivity measures. Correlation values may be positive or negative. To display the '''negative values''', make sure to change the colormap configuration: right-click on the figure > Colormap > Uncheck '''Absolute values'''. <
><
> {{attachment:corr1n_image_relative.png}}
<
><
>
== Coherence ==
Coherency or complex coherence, <>, is a complex-valued metric that measures the linear relationship of two signals in the frequency domain. Magnitude square coherence (MSC), <>, or ''coherence'', measures the covariance of two signals in the frequency domain. For a pair of time series <> and <>, with spectra <> and <>, the MSC is defined as:
. {{{#!latex
\begin{eqnarray*}
C_{xy}(f) &=& \frac{S_{xy}(f)}{\sqrt{ S_{xx}(f)S_{yy}(f)}}\\
|C_{xy}(f)|^2 &=& MSC(f) = \left(\frac{\left |S_{xy}(f) \right |}{\sqrt{ S_{xx}(f)S_{yy}(f) }}\right)^2 = \frac{\left |X(f)Y^*(f) \right |^{2}}{X(f)X^*(f)Y(f)Y^*(f)} \\
S_{xy}(f) &:& \textrm{Cross-spectrum} \\
S_{xx}(f) \quad \textrm{and} \quad S_{yy}(f) &:& \textrm{Auto-spectra or power spectral densities} \\
\end{eqnarray*}
}}}
Two related measures, which address the problem of volume conduction, are '''imaginary coherence''' ([[https://doi.org/10.1016/j.clinph.2004.04.029|Nolte et al., 2004]]), <>, and '''lagged coherence''' ([[https://arxiv.org/pdf/0706.1776|Pascual-Maqui, 2007]]), <>, which are defined as:
. {{{#!latex
\begin{eqnarray*}
IC_{xy}(f) &=& \mathrm{Im} \left (C_{xy}(f) \right ) = \frac{\mathrm{Im} \left (S_{xy}(f) \right )}{\sqrt{ S_{xx}(f)S_{yy}(f) }} \\
LC_{xy}(f) &=& \frac{\mathrm{Im} \left (C_{xy}(f) \right )}{\sqrt{ 1 - \left [ \mathrm{Re}\left ( C_{xy}(f) \right ) \right ]^{2} }} = \frac{\mathrm{Im} \left (S_{xy}(f) \right )}{\sqrt{ S_{xx}(f)S_{yy}(f) - \left [ \mathrm{Re}\left ( S_{xy}(f) \right ) \right ]^{2} }} \\
\end{eqnarray*}
}}}
where <> and <> are the imaginary and real parts of a complex number, respectively.
Note that the cross-spectrum (<>) and the power spectral densities (<> and <>), and as consequence also coherency (<>) can be obtained through different time-frequency decomposition methods (such as: Hilbert transform, wavelet transform and short-time Fourier transform), and for different time resolutions (per sample, windowed and entire file).
=== Process options ===
* Process '''Connectivity > Coherence NxN''':<
><
> {{attachment:gui_cohere1n.png}} <
> {{attachment:gui_cohere1n_b.png}}
* '''Time window:''' Segment of the time series used for the connectivity analysis. Select '''All file'''.
* '''Connectivity metric '''shows variants of coherence measures. Select: '''Magnitude squared coherence'''.
* '''Time-frequency decomposition '''selection of the time to time-frequency transformation. Select: (short-time) '''Fourier transform'''.
* '''Options [Edit] '''shows the options of the selected time-frequency transformation.
* '''Window length:''' Duration in seconds for the [[https://neuroimage.usc.edu/brainstorm/Tutorials/ArtifactsFilter#Evaluation_of_the_noise_level|spectrum estimation]]. Set to: '''1s'''.
* '''Overlap:''' Percentage of overlap between consecutive sliding time windows. Set to: '''50%'''.
* '''Highest frequency''': After the computation, removes all the frequencies above this threshold, mostly for visualization purposes. The value needs to be <= Fs/2. Set to: '''60 Hz'''.
* '''Time resolution '''selection of the time resolution. Select: '''None'''.
* '''Output options''': Select Estimate and save '''separately for each file'''.
=== Result visualization ===
Coherence is frequency specific: a connectivity graph and a connectivity matrix are produced for each frequency bin of the spectrum. Right-click on the coherence result file to show display options:
* '''Display as graph''': Plots a connectivity graph for each frequency bin.
* '''Display as image''': Plot a connectivity matrix for each frequency bin.
* '''Power spectrum''': Plot coherence as a function of frequency, between each time series.
Open the 3 types of visualization: they are linked by clicking on the spectral representation of the coherence, which will change the current frequency bin and update the connectivity measures displayed in the graph and matrix. The value of the current frequency bin can also be changed in the Time panel. <
><
>
{{attachment:res_cohere1n.png}} <
><
>
Other variants of coherence can be derived following the above procedure. The figures below display the coherence spectra obtained from the imaginary coherence (left) and the lagged coherence (right) measures.
|| {{attachment:res_cohere1n_d.png||width="350"}} || || {{attachment:res_cohere1n_e.png||width="350"}} ||
<
><
>
== Granger causality ==
Granger causality (GC) is a measure of '''directed functional connectivity''' based on the Wiener-Granger causality framework. GC measure linear dependencies between time series, and tests whether the prediction of the future of signal <> (approximated by a linear autoregressive model) is improved by considering signal <> (also approximated by a linear autoregressive model). If there is such improvement, one concludes that signal <> has a Granger causal effect on the other signal. In sum, some '''independent information''' from the past of signal <> improves the prediction of the future of signal <>, with respect to only observing its past <>. GC takes nonnegative values; its is zero when no Granger causality can be attributed. The term '''independent''' means that GC is invariant with the scale of the input signals <> and <>. <
><
> See [[GrangerCausality|Granger causality - mathematical background]] for a more complete background.
{{{#!wiki note
Despite the name, '''Granger causality indicates directionality but not true causality'''. <
> For example, if a variable <> is causing both <> and <>, but with a smaller delay for <> than for <>, then the GC measure between <> and <> would show a non-zero GC for <> --> <>, even though <> is not truly causing <> ([[https://doi.org/10.1016/j.neuroimage.2010.02.059|Bressler and Seth, 2011]]).
}}}
=== Process options ===
* Process '''Connectivity > Bivariate Granger causality NxN'''<
><
> {{attachment:gui_granger1n.png||width="400"}}
* '''Time window:''' Time segment of the time series used for the connectivity analysis. Select '''All file'''.
* '''Remove evoked response''': This option is recommended by some authors as it satisfies the zero-mean stationarity of the GC model, but does not account for trial-to-trial variability; see ([[https://doi.org/10.1016/j.neuroimage.2008.03.025|Wang et al., 2008]]). Leave it '''Unchecked'''.
* '''Maximum Granger model order:''' The most common criteria used to define the order of the autoregressive models used by GC to approximate the input time series are the [[https://en.wikipedia.org/wiki/Akaike_information_criterion|Akaike’s information]] criterion, the [[https://en.wikipedia.org/wiki/Bayesian_information_criterion|Bayesian-Schwartz’s criterion]], and the [[https://en.wikipedia.org/wiki/Hannan–Quinn_information_criterion|Hannan-Quinn criterion]]. Low model orders will yield coarse approximations of the input time series. High model orders may yield spurious GC connectivity estimates. The simulated time series were created with an AR model of order 4; please use a maximum Granger model order of '''6'''.
* '''Output options''': Select '''Save individual results'''. <
>
=== Results visualization ===
The connectivity matrix (left panel below) is not symmetric because GC values are direction specific. The upper right elements of the matrix indicate there is a GC influence from signal 1 to signal 3. In the connectivity graph (right panel below) the directionality is shown with an arrowhead at the center for the arc connecting two nodes.
|| {{attachment:res_granger1n_a.png}} || || {{attachment:res_granger1n_b.png}} ||
<
><
>
== Spectral Granger causality ==
The Spectral Granger causality is a measure of '''directed functional connectivity '''that was developed to indicate frequency specific influences between time series ([[https://doi.org/10.1103/PhysRevLett.100.018701|Dhamala et al., 2008]]).
=== Process options ===
* Process: '''Connectivity > Bivariate Granger causality NxN'''. <
><
> {{attachment:gui_spgranger1n.png||width="400"}} <
><
>. Here we used the same parameters as with [[#Granger_causality|GC]] plus two two extra parameters specific to spectral GC:
* '''Maximum frequency resolution''': Width of frequency bins in PSD estimation. Set to '''1 Hz'''.
* '''Highest frequency''': computes GC values under the specified frequency. Should be set <= Fs/2. Use: '''60 Hz'''.
=== Result visualization ===
As with coherence, spectral GC can be plotted as a function of frequency. The display below shows a peak around 25 Hz that corresponds to the expected causal interaction of Signal 1 on Signal 3.
{{attachment:res_spgranger1n.png}} <
><
>
== Envelope correlation ==
In the [[Tutorials/TimeFrequency|time-frequency tutorial]], we have introduced '''Morlet wavelets''' and the '''Hilbert transform''' as methods to decompose time series in the time-frequency (TF) domain.
The outcome of these two TF transformations is an [[https://en.wikipedia.org/wiki/Analytic_signal|analytic signal]], <>, which is a complex time series uniquely associated to the original data time series, <>, which '''module''' <>, and '''phase''' <>, correspond to the '''instantaneous amplitude''' (or envelope) and '''instantaneous phase''' of the original time series <>, respectively. The real part of <> is the original time series <>, and the imaginary part is the Hilbert transform of that same time series <>.
. {{{#!latex
\begin{eqnarray*}
\tilde{x}(t)= x(t) + j\mathcal{H}\left\{ x(t) \right\} = a_{\tilde{x}}(t)e^{j\phi_{\tilde{x}}(t)} \\
\end{eqnarray*}
}}}
{{{#!wiki note
The analytic signal of oscillatory or '''narrowband''' signals provide '''meaningful''' and '''interpretable''' estimations of instantaneous amplitude and phase. While it is technically feasible to derive these elements from broadband time series, they would not be interpretable (see [[https://mitpress.mit.edu/books/analyzing-neural-time-series-data|Cohen, 2014]]).
}}}
The instantaneous amplitude (or envelope) of the analytic signals can be used to carry out pairwise connectivity analysis with correlation. This is to say amplitude envelop correlation (AEC).
An optional step consists in '''orthogonalizing''' the pairs of amplitude envelope time series before computing the correlation. Orthogonalization is performed by first removing the real part of their coherence to reduce volume conduction (at the sensor level) or cross-talk effects (at the source level) ([[https://psycnet.apa.org/doi/10.1038/nn.3101|Hipp et al., 2012]]).
=== Process options ===
* Process: '''Connectivity > Envelope Correlation N×N [2023]''' <
><
> {{attachment:gui_henv1n_ha.png||width="400"}}
* '''Time window:''' Time segment of the signal used for the connectivity analysis. Select: '''All file'''.
* '''Connectivity measure '''is the connectivity metric applied to the resulting signal amplitude envelopes. Select '''Envelope correlation (orthogonalized)'''.
* '''Time-frequency decomposition:''' '''Hilbert transform''' or '''Morlet wavelets'''. Each method requires additional parameters that will be displayed in a separate panel after clicking on '''[Edit]'''. See the [[Tutorials/TimeFrequency|time-frequency tutorial]]. In the present example, we will use the '''Hilbert transform''' with the option '''Group in frequency bands''' to present the results for the canonical frequency bands. As the sampling frequency of the signals is 120Hz, thus, make sure you remove the '''"gamma2"''' band from the targeted frequency bands.<
><
> {{attachment:gui_henv1n_hb.png||height="276",width="227"}}
* '''Time resolution:''' If '''Windowed''', connectivity is saved for each time window. If '''None''', the connectivity measures are averaged across all windows. Select '''Windowed'''. Set the additional parameters to define the windows:
* '''Time window length''': Duration in milliseconds over which the connectivity measure is computed. Set to '''5s'''
* '''Time window overlap:''' Percentage of overlap between consecutive time windows to compute the connectivity measure. Set to '''50%'''.
* '''Use the parallel processing toolbox:''' If available, will call Matlab's parallel processing to accelerate computations. Leave it '''Unchecked'''.
* '''Output options''': Select Estimate and save '''separately for each file'''.
For sake of comparison, we will compute AEC again, but this time changing the TF decomposition method to '''Morlet wavelets''' with '''Linear = 1:1:60''' (frequencies from 1 to 60 Hz with 1 Hz step).
. {{attachment:gui_henv1n_wb.png||height="276",width="227"}}
=== Results visualization ===
As with [[#Coherence|Coherence]] and [[#Spectral_Granger_causality|spectral Granger causality]], amplitude envelope correlations can be displayed as a function of frequency, and as a function of time if the '''Time resolution''' option was set to '''Windowed'''. Below are the AEC results obtained with the Hilbert transform (left panels) and with Morlet wavelets (right panels) for the first 5-s time window (top panels) and the 5-s last window (bottom panels).
|| {{attachment:res_henv1n_h.png||width="350"}} ||