[FieldTrip] Question about dataformat when using cluster based permutation testing on time-frequency data

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Wed Dec 6 09:16:05 CET 2023


Hi Knut-André,

I think that this can be solved if you do your best to be a bit more work into shaping your data structure into something that Fieldtrip likes:

G.dimord = ‘rpt_chan_freq_time’;
G.powspctrm = permute(shiftdim(tf_datamatrix,-1),[4 1 2 3]);
G.freq = frex;
G.time = <the time-axis, consisting of a vector with the number of points along the fourth dimension of the powspctrm matrix>;
G.label = {‘harry_hole’};

Best wishes,
Jan-Mathijs


On 4 Dec 2023, at 10:21, Knut-André Skaug via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:

Hello,

Thank you for providing this toolbox.

My question pertains to the data format in order to run permutation testing on time-frequency data in source space.

Because I have already extracted the time-frequency data matrix I wish to continue with the function ft_freqanalysis to run cluster-corrected permutation testing.

The time-frequency data matrix have dimensions: Frequency x Time x Trials.
Thus, there are no channels in this matrix.
I’ve tried to set the data structure to be:
G.dimord = ‘freq_time_rpt’;
G.powspctrm = tf_datamatrix;
G.freq = frex;

But this returns an error message when following the tutorial on cluster-based permutation testing – between trials – both on event-related fields and time-frequency data.

How can I carry out cluster-based permutation testing on my two time-frequency matrices, Condition A and Condition B?

Kind regards
Knut

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C01%7Cfieldtrip%40science.ru.nl%7C5f2160f21fb84097279708dbf633982d%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638374473666049920%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=1JAc9uuxohGhLG1ZHCslTDloAgWbwxioK8Aj5MtLOMo%3D&reserved=0>
https://doi.org/10.1371/journal.pcbi.1002202<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C01%7Cfieldtrip%40science.ru.nl%7C5f2160f21fb84097279708dbf633982d%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638374473666049920%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Js0nkOQQcKXDbEOzE8Rg%2B7YPpRGIUXQ31ixEO6N%2FiK8%3D&reserved=0>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20231206/578f095f/attachment.htm>


More information about the fieldtrip mailing list