[FieldTrip] Time-Frequency Plot Granger Causality
"Jörn M. Horschig"
jm.horschig at donders.ru.nl
Thu Dec 12 09:39:50 CET 2013
Hi Lisandro,
actually, for me it works by just computing a time-frequency
representation and shoving that into ft_connectivityanalysis. Is there
an error if you try that? I literally do
cfg = [];
cfg.channelcmb = ...;
cfg.method = 'granger';
granger = ft_connectivityanalysis(cfg, freq);
With freq obtained by
cfg = [];
cfg.method = 'mtmconvol';
cfg.output = 'fourier';
cfg.taper = 'hanning';
cfg.foi = 1:32;
cfg.t_ftimwin = 0.5.*ones(size(4./cfg.foi'), 1);
cfg.toi = -1:0.05:1;
freq = ft_freqanalysis(cfg, data);
Otherwise, solution 2 is something that definitely works and what I also
did first, and it worked fine. There should be nothing wrong imho, as JM
also pointed out.
Best,
Jörn
Lisandro Kaunitz wrote:
> Hi,
>
> Following the tutorial on connectivity analysis I am trying to
> implement Granger Causality on simulated signals. I can reproduce all
> the results that appear in the tutorial in my dataset but I cannot
> obtain a graph of Wavelet-based granger causality with the format:
>
> -x axis: time
> -y axis: frequency
>
> This graph should allow me to compare in a single figure how channel
> 1 granger causes channel 2 at a range of frequencies as a function of
> time (like in Fig 3 of Dhamala et al, 2008).
>
> My problem is that I cannot figure out how to produce this graph with
> the tutorial functions as they seem to automatically compute Granger
> Spectra for the whole epoch. In the tutorial demo the structure 'freq'
> has dimord: 'rpttap_chan_freq', and the structure 'granger' has
> dimord: 'chan_chan_freq'. What I am looking for is a function that
> returns a structure with the granger spectra computed with dimord of
> 'chan_chan_freq_time'
>
> 1- I've tried running 'freq = ft_freqanalysis(cfg, data);' and then
> '[output] = ft_connectivity_csd2transfer(freq);' with all types of
> parameters but I could not reach to a solution. Is there a way of
> building a time-frequency granger spectra within fieldtrip?
>
> 2- Alternatively to 1, I thought that I could compute non-parametric
> Granger Spectra for different time windows inside each epoch and then
> concatenate the results. Before doing this I would like to be sure
> that I am not missing a way of doing it that it's already implemented
> in fieldtrip (I have just started using Fieldtrip a short time ago)
>
> Thanks a lot
>
> Cheers
>
>
> Lisandro Kaunitz
>
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
--
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
Neuronal Oscillations Group
FieldTrip Development Team
P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands
Contact:
E-Mail: jm.horschig at donders.ru.nl
Tel: +31-(0)24-36-68493
Web: http://www.ru.nl/donders
Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands
More information about the fieldtrip
mailing list