LIMO-EEG-Toolbox / limo_tools

Hierarchical Linear Modelling for MEEG data
https://limo-eeg-toolbox.github.io/limo_meeg/
Other
59 stars 27 forks source link

Problems with multiple corrections when using ERSP #104

Closed mglassen closed 2 years ago

mglassen commented 2 years ago

Hi all,

I am using the integrated version of LIMO with EEGLABs study, and Im having some issues. I testing a simple comparison(1 factor, 2 categorical values) for 19 subjects. 1st level analysis runs successfully, and for 2nd level analysis I did a paired-t test which also ran fine. When using LIMO results I can plot uncorrected stat values and the plots appear and everything works, but I run into issues when trying to use multiple corrections. When I use TFCE, I get an error in limo_tfce at line 723. When appending neg_tfce and pos_tfce to the thresholded_maps variable, thresholded maps is 3d and neg_tfce is 4d,(as is pos_tfce). I would try and fix this myself but the theory behind the clustering is a little beyond me.

I also get an error when trying to use the Cluster MCC as well, but I can't pinpoint whats happening in the code because MATLABs debugger doesn't pause on this error, I just get a dialog box that pops up and says there is no function limo_cluster_test for input arguments of type double.

Any help with this issue would be appreciated! I pasted the loop where the error occurs from the TFCE part below.

% compute final score tfce_score = nansum(pos_tfce,4)+nansum(neg_tfce,4); try close(f); end if nargout == 2

                    thresholded_maps = NaN(size(pos_tfce,1),size(pos_tfce,2),...
                      size(neg_tfce,3)+size(pos_tfce,3));

                    thresholded_maps(:,:,size(neg_tfce,3):-1:1)  = neg_tfce;
                    thresholded_maps(:,:,size(neg_tfce,3)+1:end) = pos_tfce;
                    thresholded_maps(:,:,squeeze(sum(squeeze(sum(thresholded_maps,1)),1))==0) = [];
                end
CPernet commented 2 years ago

ok that is weird, all tests give 4d matrices ... would you mind sharing your group level folder so I can rerun the clustering and see what is happening? thx

CPernet commented 2 years ago

quickly checking if this is resolved or not?

mglassen commented 2 years ago

Sorry I missed your original reply, I’ll put the data up on Monday.

Best, Mike

On Jun 26, 2022, at 11:04 AM, Cyril Pernet @.***> wrote:

 quickly checking if this is resolved or not?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

CPernet commented 2 years ago

great, happy to fix that for you

CPernet commented 2 years ago

??? I'll close this since I had no news