This toolbox that we developed in matlab, is used to quantify the connectivity/causality relationships between the variables of a system’s realization i.e. a multivariate time series.
The user can choose among three simulated systems (variable in matlab: SimulatedSystem):
- Coupled Henon Maps
- Coupled Mackey-Glass
- Neural Mass Model
Also the user can modify the number of variables for each realization (variable in matlab: NumberOfVariables), the length of the time series (variable in matlab: n), the initial coupling structure between the variables (variable in matlab: cM), the coupling strengths between the variables (variable in matlab: CouplingStrengths) and the parameter values of the systems (variables in matlab: DeltaV, ExParA etc.).
rallmeasures.m is the main program for the simulated data which calls all the functions for the computation of the measures. We divided the measures in categories and if the user desires a certain category to take place in the computation, the name of the category should be declared in variable scharV. Also the user can simultaneously check the statistical significance of the results using surrogates giving a greater than zero value in variable nsur, which denotes the number of surrogates.
In the end of each realization* we save a mat file which contains:
- mea3DM: 4-D matrix with all measure values,1st dimension - coupling strength, 2nd dimension - driving variable, 3rd dimension - response variable, 4th dimension - measure
- fmea: list with the names of the measures with respect to the 4dim of mea3DM
- ppmea3DM: 4-D matrix with p-values from parametric tests for certain measures,1st dimension - coupling strength, 2nd dimension - driving variable, 3rd dimension - response variable, 4th dimension - measure
- ppfmea: list with the names of the measures that have a parametric test with respect to the 4th dimension of ppmea3DM
- if nsur>0, pmeaxT: 4-D matrix with all p-values obtained by the surrogates,1st dimension - coupling strength, 2nd dimension - driving variable, 3rd dimension - response variable, 4th dimension - measure
The variables instance and nreal are used to denote the number of realizations a certain matlab instance will run for. A concrete example would be the following:
For example we want to use 3 cores of a PC (three matlab instances) and to compute the measures on 9 realizations. In the first matlab we should use instance=1and nreal=3, in the second instance=2 and nreal=3 and in the third instance=3 and nreal=3. Then the results would go from 1 to 9.
*realization: as a realization we assume the computation of the measures on 7 multivariate time series, one for each coupling strength
The variable scharV may contain the following measure categories:
'FreqMea' 'CGCI' 'PGCI' 'GCI' 'GCRI' 'PDCRI' 'HERMES' 'PSI' 'MCR' 'MPC' 'MI' 'PMI' 'STE' 'PSTE' 'TE' 'PTE' 'TERV' 'PTERV' 'PMIME' 'H15' 'PredImprov' 'EventSync'.
Table 1: The acronms and the terms of the measusres
PDC |
partial directed coherence |
DTF |
directed transfer function |
iCOH |
imaginary coherence |
dDTF |
direct directed transfer function |
GPDC |
generalized partial directed coherence |
pCOH |
partial coherence |
GGC |
Granger Geweke causality |
CGCI |
conditional Granger causality index |
PGCI |
partial Granger causality index |
GCI |
Granger causality index |
GCRI |
Granger causality restricted index |
GCRIws |
Granger causality restricted index without surrogates |
PDCRI |
partial directed coherence restricted index |
PDCRIws |
partial directed coherence restricted index without surrogates |
PLV |
phase locking value |
PLI |
phase lag index |
wPLI |
weighted phase lag index |
DPI |
directionality phase index |
RHO |
RHO index |
PSI |
phase slope index |
MCR |
mean conditional recurrence |
MPC |
mean phase coherence |
MI |
mutual information |
PMI |
partial mutual information |
STE |
symbolic transfer entropy |
PSTE |
partial symbolic transfer entropy |
TE |
transfer entropy |
PTE |
partial transfer entropy |
TERV |
transfer entropy on rank vectors |
PTERV |
partial transfer entropy on rank vectors |
PMIME |
partial mutual information from mixed embedding |
EventSync |
event synchronization |
The main program calls the following m-files which generate the systems:
- coupledhenonmaps.m
- gmanycoupledMGdde.m
- NMMmaps.m
The main program calls the following m-files which compute the causality measures:
- mvfreqz.m
- CGCinall.m
- cca_partialgc.m
- gci.m
- rCGC.m
- restrictedpdc.m
- H_methods_PS.m
- data2psi.m
- MCRinall.m
- MeanPhaseCoh.m
- mkraskov1net.m
- conmikranet.m
- STEstan1net.m
- PSTEnet.m
- TEnneinet.m
- PTEnneinet.m
- TERV1net.m
- PTERVnet.m
- PMIME.m
- HSLMNComTimeShiftedSur.m
- nlAR_model.m
- nlARX_modelnet.m
- Event_Syncnet.m
The main program calls the following m-files which compute the causality measures on surrogates:
- mvfreqzXtoY.m
- CGCin.m
- cca_partialgcXtoY.m
- GCin.m
- rCGCxy.m
- restrictedpdcXtoY.m
- H_methods_PS_XtoY.m
- data2psiXtoY.m
- MCR.m
- MeanPhaseCohXtoY.m
- mkraskov1.m
- conmikra.m
- STEstan1.m
- PSTE.m
- TEnnei.m
- PTEnnei.m
- TERV1.m
- PTERV.m
- HSLMNComTimeShiftedSur.m
- nlAR_model.m
- nlARX_model.m
- Event_Sync.m
The rest functions of the toolbox are used inside these functions.