[FieldTrip] Inconsistency between stat.mask and p-values in ft_freqstatistics

Guillermo Sanchez-Garrido Campos gsancam at upo.es
Wed Mar 20 10:25:07 CET 2024



Hello FieldTrip team,

I've been using the ft_freqstatistics function to perform statistical 
analysis on my LFP data (recorded with Neuropixels system). I've noticed 
a discrepancy between the values in stat.mask and the p-values in 
stat.prob, which has caused confusion in interpreting the results.

Detailed Description:

I have configured my analysis as follows:

  	* Calculation of Power Spectrum:

cfg = [];
cfg.method       = 'mtmfft';
cfg.output       = 'pow';
cfg.taper        = 'hanning';
cfg.foilim       = [1 100]; % Frequency range
cfg.polyremoval  = -1;
cfg.pad          = 'nextpow2';
datafftpre = ft_freqanalysis(cfg, datapre); % Same for post

  	* Statistical Analysis:

cfg = [];
cfg.method           = 'montecarlo';
cfg.statistic        = 'ft_statfun_depsamplesT';
cfg.correctm         = 'no';
cfg.alpha            = 0.05;
cfg.tail             = 0;
cfg.correcttail      = 'prob';
cfg.computestat      = 'yes';
cfg.computeprob      = 'yes';
cfg.computecritval   = 'yes';

% Design configuration for dependent groups
nsubj = size(data, 1);
design = zeros(2, 2 * nsubj);
design(1, 1:nsubj)         = 1;
design(1, nsubj+1:2*nsubj) = 2;
design(2, :) = repmat(1:nsubj, 1, 2);

cfg.design = design;
cfg.ivar   = 1;
cfg.uvar   = 2;

stat = ft_freqstatistics(cfg, datafftpre, data);

However, upon inspecting the results, I noticed that stat.mask did not 
match the p-values in stat.prob. I expected the values in stat.mask to 
reflect the p-values lower than cfg.alpha, but this was not the case.

Input Data:

My data is organized into two 3D matrices, datafftpre and datafftpost, 
each with 3 subjects (1st dimension), 310 rows (recording channels), and 
649 columns (frequencies). Each cell contains the value of the power 
spectrum for each subject, channel, and frequency.

I appreciate any guidance or suggestions on how to correctly interpret 
the results of my analysis.

Thank you for your attention and support.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20240320/4f0c6d18/attachment.htm>


More information about the fieldtrip mailing list