Back to the main page.

Bug 2491 - ft_clusterplot should check if cfg.correctail option was use to warn the proper pvalue

Reported 2014-03-05 14:59:00 +0100
Modified 2019-08-10 12:29:38 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Linux
Importance: P5 normal
Assigned to: Diego Lozano Soldevilla
Depends on:
See also:

Diego Lozano Soldevilla - 2014-03-05 14:59:00 +0100

On doing cluster-based nonparametric permutation tests there's the cfg option "correcttail" to correct the type I error rate (alpha) in case of a two-tailed test. There's a FAQ about it: ft_clusterplot uses the cfg.alpha input to mask the pvalues. If the cfg.correcttail is used for a two-tailed test, the cfg.alpha should be asked is 0.025 and not 0.05. To alert users about this inconsistency, we should check the stat.cfg and check whether correcttail was properly specified and throw a warning in case is not.

Diego Lozano Soldevilla - 2014-03-12 10:53:33 +0100

(In reply to Diego Lozano Soldevilla from comment #0) Warning implemented: if (strcmp(stat.cfg.correcttail,'alpha') || strcmp(stat.cfg.correcttail,'prob')) && (stat.cfg.tail == 0); if ~(cfg.alpha >= stat.cfg.alpha); warning(['the pvalue you plot: cfg.alpha = ' num2str(cfg.alpha) ' is higher than the correcttail option you tested: stat.cfg.alpha = ' num2str(stat.cfg.alpha)]); end end Sending ft_clusterplot.m Transmitting file data . Committed revision 9287.

Robert Oostenveld - 2019-08-10 12:29:38 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue describing the issue on