Back to the main page.

Bug 538 - ft_freqstatistics errors on connectivity data made from fourier data with dimord chan_chan

Reported 2011-03-17 02:30:00 +0100
Modified 2011-05-25 15:07:22 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P1 normal
Assigned to: Jan-Mathijs Schoffelen
Depends on:
See also:

Matt Mollison - 2011-03-17 02:30:37 +0100

I'm using fieldtrip-20110315 on a Mac Pro running MATLAB 7.11 and OS X 10.6.6. Jan-Mathijs has already told me that he knows the statistics functions can't deal with a dimord with chan_chan in <>. I thought I would submit this as a bug because I can't find anything like it in the bugzilla database. I tried to run ft_freqstatistics (cfg.method = 'analytic', cfg.statistic = 'depsamplesT') on ft_connectivityanalysis (cfg.method='plv') output that came from ft_freqanalysis using cfg.method='mtmconvol', cfg.output='fourier', cfg.keeptrials='yes', cfg.keeptapers='yes'. However, it seems that the 'chan_chan' part of the 'chan_chan_freq_time' dimord for plvspctrm needs to be reshaped to 'chan_freq_time'. Here's the output/error I get: renaming parameter 'plvspctrm' into 'powspctrm' ??? Error using ==> size Dimension argument must be a positive integer scalar within indexing range. Error in ==> prepare_timefreq_data>forcedimord at 540 Nchan = size(output.dat, chandim); Error in ==> prepare_timefreq_data at 87 [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in ==> statistics_wrapper at 217 [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ==> ft_freqstatistics at 127 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); How do people do stats with connectivity data if this doesn't work? People on the FT list and in the group of developers are obviously doing connectivity analyses. I'm really not sure what's wrong in my workflow or conception of how this should work. I'm doing analyses on within-subjects experiment data (multiple subjects, all ran in the same conditions, and I want to compare conditions), but I'm especially confused because statfun_indepsamplesZcoh wants fourier data with the dimord chan_chan reshaped to have only one channel dimension. I know statfun_indepsamplesZcoh is for analyses within a single subject, but I get the same error when I try this on a single subject (I was hoping that using that statfun would reshape the data somewhere in the function). I hope it's not just me with this problem, but if it is I hope someone can provide some helpful input about what I'm doing wrong. Cheers, Matt

Matt Mollison - 2011-03-17 02:48:19 +0100

*** Bug 480 has been marked as a duplicate of this bug. ***

Jan-Mathijs Schoffelen - 2011-05-25 15:07:22 +0200

ft_freqstatistics does not rely on statistics_wrapper anymore and handles bivariate data much more elegantly; I close this bug because I don't know whether the issue persists in the new implementation