[FieldTrip] 3x2 cluster-based permutation and random seed
Annie Menart
amenart at purdue.edu
Wed Jul 2 20:49:58 CEST 2025
Dear Fieldtrippers,
We are currently adapting a 2 group by 2 condition cluster-based permutation to be a 3 group by 2 condition cluster-based permutation. Following the documentation, we are subtracting the conditions to test the interaction. Does the code below look like a valid way to do this? It's running correctly and we don't get errors, but we wanted to make sure, since it differed from the setup of the K-by-L example.
Example code from the 2x2 documentation :
cfg = [];
cfg.parameter = 'powspctrm';
cfg.operation = 'subtract';
GAdiff11_12 = ft_math(cfg, GA11, GA12);
GAdiff21_22 = ft_math(cfg, GA21, GA22);
...
[stat] = ft_freqstatistics(cfg, GAdiff11_12, GAdiff21_22);
Our adaptation of the example code to be a 3x2 interaction:
cfg = [];
cfg.parameter = 'powspctrm';
cfg.operation = 'subtract';
GAdiff11_12 = ft_math(cfg, GA11, GA12);
GAdiff21_22 = ft_math(cfg, GA21, GA22);
GAdiff31_32 = ft_math(cfg, GA31, GA32);
...
[stat] = ft_freqstatistics(cfg, GAdiff11_12, GAdiff21_22, GAdiff31_32);
Secondly, for cluster-based permutations (ft_freqstatistics), can you set the seed using cfg.randomseed? In the documentation, we've seen it used for ft_componentanalysis, but we weren't sure if it also worked for ft_freqstatistics. We have it running with no errors, but wanted to make sure since we didn't see the parameter cfg.randomseed used directly in ft_freqstatistics. If not, is there a way to set the seed?
Best,
Annie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20250702/224bc911/attachment.htm>
More information about the fieldtrip
mailing list