[FieldTrip] ft_connectivityanalysis

jan-mathijs schoffelen jan.schoffelen at donders.ru.nl
Tue Jul 19 08:50:21 CEST 2011


Hi Lieneke,

Sorry that your scripts broke. I will look into it.

> 1. I get the following error: 'Error using ft_selectdata, selection of or averaging across channels in the presence of both label and labelcmb is not possible'. 
> 
> -> My output from ft_freqanalysis and input to ft_connectivityanalysis = 'powerandcsd'. Eric didn't have the problem when using 'fourier', but then you don't get the field 'labelcmb' in your output. 
> -> I can't help getting both label and labelcmb from freqanalysis if choosing 'powerandcsd'. If I remove the field 'label' from the structure, the function gives an error missing the field 'label' elsewhere. So I need both fields 'label' and 'labelcmb'. Previously, this problem did not exist. 
> 
> Did something change here? This brings me to point 2. 


Is there a particular reason why you want to stick with 'powandcsd'? Using 'fourier' in the output will give you full flexibility later on in your analysis. Admittedly, you don't get a 'labelcmb' in your output, but you can still specify cfg.channelcmb before calling ft_connectivityanalysis. My suspicion is that this will solve your problem. The reason for your bug is that we cleaned up the code a bit (to make it more transparent), and that we had to backward-support a large number of potential ways in which users are used to using the functionality in FieldTrip. Once again, I will try to solve this issue, but I strongly urge you (and the rest of the community) to start using 'fourier' as a method in ft_freqanalysis. Eventually it will make life much easier (for both user and programmer ;o) ). Yet, I can imagine that if you are under time pressure to finish your thesis you don't feel like changing your approach. Anyway, I have written some documentation on this issue here: 

http://fieldtrip.fcdonders.nl/faq/in_what_way_can_frequency_domain_data_be_represented_in_fieldtrip

> 2. I would like to run ft_connectivityanalysis for a selected group of channelpairs. Again, I get the aforementioned error. 
> The same error I get if I run ft_freqdescriptives for a selection of channels (not all channels!, in contrary to my point 1... there I get the error both when I select channels as well as if I say channels = 'all'). Therefore I suspect that the first problem is caused by a bug in ft_connectivityanalysis, not in the more general function ft_selectdata that both ft_freqdescriptives and ft_connectivityanalysis make use of. Does that make sense?

Not really. What is the error you get when calling ft_freqdescriptives? As such ft_freqdescriptives shouldn't work on the bivariate metric (i.e. cross spectra), and should not worry about labelcmb. 

> 3. In addition, I would like to calculate the standard error of my coherence output (if I can get it again at some point :)) using the method 'jackknife' (as recommended by Eric). ft_connectivityanalysis still has the option to use jackknife in its code, it just doesn't do anything with the setting anymore. The same goes for ft_freqdescriptives (but having it in ft_connectivityanalysis would do for me!). 

Are you sure? As far as I know, jackknifing should still be supported by both functions. It is of course crucial that you retain your single trial estimates in the input data (i.e. calling ft_freqanalysis with cfg.keeptrials='yes').

> I hope the points I've made are a bit clear, otherwise please let me know. It's a serious problem for me not being able to run the coherence analysis, since I'm trying to finish my master thesis within a few weeks from now... So it would be great if somebody could help me! 
> 
> Thanks in advance :). 
> 
> Best, 
> Lieneke

 Best,

Jan-Mathijs

Dr. J.M. (Jan-Mathijs) Schoffelen 
Donders Institute for Brain, Cognition and Behaviour, 
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands
J.Schoffelen at donders.ru.nl
Telephone: 0031-24-3614793

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110719/09d2e764/attachment-0002.html>


More information about the fieldtrip mailing list