Back to the main page.

Bug 221 - ft_freqstatistics (montecarlo) should throw error if receiving input from ft_freqgrandaverage

Reported 2010-11-15 18:39:00 +0100
Modified 2010-11-17 09:45:05 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: All
Operating System: Windows
Importance: P1 normal
Assigned to: Jan-Mathijs Schoffelen
Depends on:
See also:

Roemer van der Meij - 2010-11-15 18:39:46 +0100

The same holds for ft_timelockstatistics I assume. In case on gives output from ft_freqgrandaverage to ft_freqstatistics with cfg.method = montecarlo, it results in the rather non-informative error in statistics_montecarlo: ??? Error using ==> statistics_montecarlo at 217 could not determine the parametric critical value for clustering Error in ==> statistics_wrapper at 285 [stat, cfg] = statmethod(cfg, dat,, 'issource',issource); Error in ==> ft_freqstatistics at 127 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); A dimord-check somewhere along the line should throw an error at the appropriate function, and one that is more informative, e.g.: "input from ft_freq/timelockgrandaverage not supported".

Jan-Mathijs Schoffelen - 2010-11-15 20:25:20 +0100

The error is not non-informative, but results from the fact that 'the parametric critical value for clustering' could not be determined. Output of ft_freqgrandaverage can be swallowed (and should be) if cfg.keepindividual = 'yes'. This results in a dimord of 'subj_chan_freq(_time)', and works just fine (last time I checked. The error is most likely caused by the fact that the specific 'statfun' doesn't have a snippet of code included which can actually perform the parametric threshold computation. In general this holds for those statfuns which have not been contributed by Eric.

Roemer van der Meij - 2010-11-16 09:43:57 +0100

Hmmm, in this case that wasn't true apparently. The input was two structures, each with a dimord of 'subj_etc..', using 'depsamplesT' as statfun. I will look into it further, as probably something else went wrong then.

Roemer van der Meij - 2010-11-16 17:47:09 +0100

Ouch, after some debugging it appeared the end-user just accidentally switched the cfg.ivar and cfg.uvar variables, making the design matrix bogus. I will look into a better error message, see what is going one.