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

Guillermo Sanchez-Garrido Campos gsancam at upo.es
Tue Mar 26 09:21:54 CET 2024



Jan,

First of all, I did check Mikkel suggestions about the tutorial of "the 
p-values associated with the cluster" 
(https://www.fieldtriptoolbox.org/workshop/oslo2019/statistics/). 
However, as I mentioned in my first mail, my data comes from Neuropixels 
1.0 recordings, not EEG data from several electrodes around the brain, 
but a single tract with 384 channels across 3.8 mm depth (here you have 
the link of the first article for further information in case you are 
not familiarized with the system: 
https://www.nature.com/articles/nature24636). Regarding clusters, after 
consulting with a colleague who has more experience with FieldTrip, it 
seems that using clusters may not be appropriate for our data analysis. 
Our recording system, being based on a single tract (Neuropixels), may 
not align well with the typical cluster-based analysis, which is more 
commonly used for EEG and recordings from multiple brain regions. 
Therefore, we opted for a different approach that better suits our data 
structure. According to this, information about clusters was not useful 
to this matter, or that is what we thought, maybe we could argue this. 
So, as he suggested me, after discussing mask, prob, and cirange 
variables after the statistic script, I wrote another issue in the 
Github. Just to clarify my little chat with Mikkel, in case I did not 
clarify it 😊.

Regarding the use of "fdr" for multiple comparisons, initially, I wanted 
to perform a more straightforward analysis of the data without applying 
fdr or any other method to have a preliminary view of the results. 
However, even after applying fdr, I still encounter the correlation 
between mask and cirange, and the inconsistency between mask and prob.

Now, regarding your inquiries:

	*

Actually yes, there is new information in the last issue, if you look 
carefully. As I checked the "ft_statistics_montecarlo", 
"ft_statistics_analytic", and "ft_freqstatistics" in the Fieldtrip 
github in order to know how the mask variable is calculated, no clues I 
found about this topic. The only part I found about the mask variable 
was this: stat.mask = stat.prob<=cfg.alpha; 
(https://github.com/fieldtrip/fieldtrip/blob/release/ft_statistics_montecarlo.m#L455 
and 
https://github.com/fieldtrip/fieldtrip/blob/release/ft_statistics_analytic.m) 
when no correction was utilized. Consequently, rechecking the stat 
variable that I got from ft_freqstatistics, I realized the cirange and 
mask consistency that I have mentioned in the last issue. At this point, 
it was my last message with Mikkel, as I did not know if this 
correlation is a bug from the script or maybe I did commit some mistake 
with my input information.
	*

According to the cirange, the same I said before, I do not know if I 
have to but the point is that there is a correlation with the mask 
variable. When it appears a value of 0 at cirange (let's say at 
positions x and y, in the matrix), at those same positions, it appears a 
"1" at mask, independently if prob(x,y) < cfg.alpha or not. Repeating 
myself in order to clarify, I do not know if this is a random 
correlation or if it happens for a bug in the script, but I thought it 
was worth asking 😊.
	*

I may have missed one line from my code, but yes, you are right, I have 
this following line regarding the number of randomizations: 
"cfg.numrandomization = 'all';". Another fault from my part and my code, 
the "data" you mentioned was referring to "datafftpost" but I may have 
copied an old version of the code, so sorry for that.
	*

Making statistics with 3 subjects is not definitive, obviously, but you 
can have an idea of what differences you have between experimental and 
sham group (also if there are any), so it may be helpful although you 
cannot believe it until the N is more representative. Also, I was trying 
to check if the code was working properly with my data.

Thank you for your support in this matter, and I appreciate any feedback 
you can provide. I hope we can discuss any further questions that may 
arise from my data calmly and as adults.

Kind regards,

Guille
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20240326/e14b19cd/attachment.htm>


More information about the fieldtrip mailing list