[FieldTrip] Non-Parametric Granger Causality - Freq * Spatial Filter
Schoffelen, J.M. (Jan Mathijs)
jan.schoffelen at donders.ru.nl
Mon Aug 22 21:50:26 CEST 2016
Hi Robert,
In principle it’s OK, and computationally efficient, to (left)-multiply the spatial filter with the fourier coefficients (in a for-loop across frequencies, or something like that), to get the source-level fourier representation.
Practically, you would need to do something like:
nchan = numel(freq.label);
nfreq = numel(freq.freq);
nrpttap = size(freq.fourierspctrm,1);
fourier_source = filter*reshape(permute(freq.fourierspctrm,[2 3 1]), [nchan nfreq*nrpttap]));
fourier_source = reshape(fourier_source, [nfreq nrpttap]);
Now you have a nfreq*nrpttap matrix that represents per tapered data segment the fourierspctrm.
From this representation, you would want to create the source pair-wise cross-spectral density that can be subjected to the non-parametric factorization code to compute Granger causality.
That is, it’s more or less OK if you know what you’re doing, but can become tricky in terms of correct data administration/bookkeeping.
Otherwise, and perhaps more straightforwardly, I’d recommend to do a time-domain source reconstruction (create a set of ‘virtual channels’, there’s are some examples in the wiki’s tutorials how to do it), and then use ft_freqanalysis and ft_connectivityanalysis on the virtual channel data.
Best wishes,
Jan-Mathijs
On 22 Aug 2016, at 17:24, Seymour, Robert (Research Student) <seymourr at aston.ac.uk<mailto:seymourr at aston.ac.uk>> wrote:
Dear Fieldtrip Users,
I am trying to compute non-parametric granger causality between several ROIs in source-space. I am using the following code to obtain the fourier-spectra of my sensor-level data.
cfg = [];
cfg.output = 'fourier';
cfg.method = 'mtmfft';
cfg.taper = 'dpss';
cfg.tapsmofrq = 4;
cfg.keeptrials = 'yes';
cfg.pad = 1;
cfg.padtype = 'zero';
freq = ft_freqanalysis(cfg, data_fix);
I was wondering how to project the sensor level fourier-data into source space using the spatial filters computed when calling ft_sourceanalysis? I.e. how to multiply the freq*filter? I am little unsure how the fourierspctrm is represented and how this will feed into ft_connectivity analysis?
Many thanks,
Robert Seymour (PhD Student, Aston Brain Centre)
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160822/80f0b21f/attachment-0002.html>
More information about the fieldtrip
mailing list