Permutation t-test on significant activity in ROI

Hi

I am replicating the analysis from another study. I want to run t-tests between two groups on the averaged significant activity within 6 ROI. Following the description of that analysis I ran a permutation t-test on all 128 channels. I then need to identify the significant channels (p<0.01) and place them into 6 ROI (up to 14 possibly significant sensors within each ROI) and average the activity in each ROI. I was able to identify the significant channels using the apply statistical threshold option.

Is there a way in Brainstorm to create scouts or montages from the selected electrodes (the significant electrodes)? I could then run another permutation test on the averaged significant activity in each ROI by comparing each scout or montage (using the option to 'average activity within selected sensors' in the test>permutation window). Or would I have to manually enter the sensor numbers?

Hi David,

If you have multiple channels selected at once in a time series figure (such as the t-values plot for statistics) you can right click on the figure and go to Montage -> Create from selection to create a montage from the selected channels. Does that do what you had in mind?

Best,
Martin

Hi Martin,

Thank you. I figured a workaround to get the significant channels within each ROI using apply the statistic threshold in Brainstorm and then matching the extracted channels with pre-selected channels in 6 ROI using intersect() in MatLab. This allows for creating montages/ROI of significant channels only.

The issue I'm having now is to run the permutation test again on only these channels within different ROI. I've stored the channels in in a 6x1 struct S in field ROI_Sig and I'm trying to run a loop through these in a permutation test. I've looked through the tutorial on scripting loops and on MatLab forums but I can't get it to run. The script runs fine on each list of channels (i.e. when I delete the loop and replace i in "ROIData = S(i).ROI_Sig" with a value 1-6). With the loop, the test will run on the first list of channels only. I attach a screenshot of the report.

% Process: Select files using search query
sFiles5 = bst_process('CallProcess', 'process_select_search', , , ...
'search', '(([name CONTAINS "HLG"] AND [name CONTAINS "bl"] AND [name CONTAINS "Avg"] AND [path CONTAINS "Subject"] AND [name CONTAINS "11_right"]))');
sFiles6 = bst_process('CallProcess', 'process_select_search', , , ...
'search', '(([name CONTAINS "CG"] AND [name CONTAINS "bl"] AND [name CONTAINS "Avg"] AND [path CONTAINS "Subject"] AND [name CONTAINS "11_right"]))');

% Process: Perm t-test equal [100ms,250ms All ROI] H0:(A=B), H1:(A<>B)
for i = 1:length(S)
ROIData = S(i).ROI_Sig
sFiles5 = bst_process('CallProcess', 'process_test_permutation2', sFiles5, sFiles6, ...
'timewindow', [0.1, 0.25], ...
'sensortypes', ROIData, ...
'isabs', 0, ...
'avgtime', 0, ...
'avgrow', 1, ...
'iszerobad', 1, ...
'Comment', '', ...
'test_type', 'ttest_equal', ... % Student's t-test (equal variance) t = (mean(A)-mean(B)) / (Sx * sqrt(1/nA + 1/nB))Sx = sqrt(((nA-1)*var(A) + (nB-1)*var(B)) / (nA+nB-2))
'randomizations', 4000, ...
'tail', 'two'); % Two-tailed
end

Best
David

Hi Martin,

I've solved this.

Thanks,
David