Cluster-based permutation tests on time-frequency data:

1,294 views
Skip to first unread message

Rachel Rac

unread,
Feb 6, 2017, 7:06:41 AM2/6/17
to AnalyzingNeuralTimeSeriesData

Dear Mike and all,


I used wavelet convolution to extract power and ITPC on each of the recorded 64 channels in the frequency range of 2-50Hz. Laplacian filtering was run on the data before convolution. I have 4 within subject conditions and I'm interested in the difference in power between 2 conditions. Because I don't have a prediction about the spatial location of this difference in power I want to perform a multi-sensor analyses. I'm using Mike's permutation testing script  with the modification that I'm permuting between two conditions of each subject and also, I'm calculating the test statistic (i.e., the maximum of the cluster-level summed t-values) on this random partitions ( Maris and Oostenveld, Journal of Neuroscience Methods, 2007 ). This was done until now on a selected channel. Now I want to find clusters in a 3D space of time-frequency-channel.

Can you please explain to me how can I take channel spatial organization into account when clustering in the time-frequency-channel space? Does the 'bwconncomp' function in Matlab considers spatial adjacency of a sphere?


Thank you,

Best


Rachel

Mike X Cohen

unread,
Feb 7, 2017, 3:46:20 AM2/7/17
to analyzingneura...@googlegroups.com
Hi Rachel. I admit I didn't discuss this issue in enough detail in the book. You have two options for multiple comparisons over electrodes.

1) Use a distance-based cluster definition, e.g., electrodes form a cluster if they are within 10 cm of each other, or if they are neighbors. This is the way fieldtrip implements multiple comparisons corrections.

2) Obtain the interpolated 2D spatial surface of activity. The eeglab topoplot function exports this matrix (it's something like a 64x64 matrix and contains the interpolated values that get plotted in space). You can then treat this like any other (e.g., time-frequency) map and do statistics and cluster correction on these images. This procedure combined with frequencies would give you a 2D "cylinder" of data, with height corresponding to frequency and each plane corresponding to space (the head mapped to 2D). Once you have this, then indeed you can use bwconncomp to identify clusters in the frequency-topography space.

Mike



--
You received this message because you are subscribed to the Google Groups "AnalyzingNeuralTimeSeriesData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to analyzingneuraltimeseriesdata+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/analyzingneuraltimeseriesdata.
For more options, visit https://groups.google.com/d/optout.



--
Mike X Cohen, PhD
mikexcohen.com

Rachel Rac

unread,
Feb 8, 2017, 8:11:50 AM2/8/17
to AnalyzingNeuralTimeSeriesData

Hi Mike,


Thank you for your quick and helpful answer. I'm working on option b now. I have the interpolated matrix of 67*67. If I understand correctly, for the permutation testing I need to have a 5D matrix with: 1000 (number of permutations) * subjects *space (2D) * time, for each frequency I'm interested at. It works but it takes a lot (!) of time and RAM. I can eliminate the time dimension by choosing the mean of a certain time window but I wanted the time precision together with spatial. Do you have a better suggestion to find the electrodes of interest for statistical analyses?


I wanted to thank you for writing the book and uploading your lectures and scripts. I'm a beginner in EEG analysis and it helped me tremendously. I'm learning a lot from writing the scripts of my analysis.

I appreciate the help

Best,

Rachel


בתאריך יום שלישי, 7 בפברואר 2017 בשעה 10:46:20 UTC+2, מאת Mike X Cohen:

Mike X Cohen

unread,
Feb 8, 2017, 8:40:34 AM2/8/17
to analyzingneura...@googlegroups.com
Hi Rachel. Indeed, these kinds of analyses can produce very large matrices. It's always a good idea to select data when possible, preferably by some a priori hypothesis about the appropriate time or frequency windows. 

But I don't think you should have subjects as a dimension. The idea of the permutation test is that each iteration reflects a group-level statistical result under the null hypothesis. For example, if your analysis involves t-tests, then each map would be the average condition differences (averaged over subjects) divided by the standard deviations over subjects. That would produce a single map. If you have a dimension for subjects, it might be mostly empty except for one element. Or maybe you are doing something different from what I described here.

Mike


Rachel Rac

unread,
Feb 8, 2017, 11:28:41 AM2/8/17
to AnalyzingNeuralTimeSeriesData

Thanks a lot for this clarification. The subject dimension was necessary to calculate the t-test of each pixel. Just to make sure, what you suggest is that I should take the map after doing the t-test on each pixel and permute the t-values in the time-space map and then search for clusters?


Best,

Rachel 


בתאריך יום רביעי, 8 בפברואר 2017 בשעה 15:40:34 UTC+2, מאת Mike X Cohen:

Mike X Cohen

unread,
Feb 8, 2017, 11:41:47 AM2/8/17
to analyzingneura...@googlegroups.com
I would think you would have three matrices (for convenience I'm pretending space is 1D): 
M1) real data contained in a subjects X space X time matrix, from which you would compute:
M2) observed statistics in a space X time matrix (e.g., t-values), and
M3) null-hypothesis distributions in a 1000 X space X time matrix

Then your statistical evaluation would be based on
zmap = (M2-mean(M3))/std(M3);

The size of zmap would be the same size as M2. Then zmap would be thresholded to find clusters. And you would have to loop through iterations in M2 to threshold and get a distribution of null-hypothesis clusters.

I hope that helps clarify. If you have more questions, you could send some code (on or off-list) so I could take a closer look.

Mike


Reply all
Reply to author
Forward
0 new messages