I would like to conduct a Representational Similarity Analysis (RSA) on MEG data. Essentially, it computes the Spearman correlation between a neural RDM and a model RDM for each subject, obtaining a rho value at each source and time point. I then want to perform spatiotemporal clustering to identify significant clusters across subjects where the correlation between the neural and model RDM is significant, followed by a permutation test to assess their statistical significance. I have been looking into MNE function mne.stats.spatio_temporal_cluster_test for spatiotemporal cluster analysis, but I’m not sure how to adapt it for RSA. Specifically, I’m encountering two problems:
- For the argument threshold: could I simply specify a rho value?
- stat_fun: how can I define the test statistic function to work with RSA and ensure that the permutation test properly shuffles the neural RDM values?
If spatio_temporal_cluster_test is not well-suited for this purpose as currently implemented, is there another function within MNE that provides a more flexible spatiotemporal clustering framework where I could specify RSA as the statistical test?