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

limo_stat_values when running for only one channel has a mistake in the number of dimensions for bootM #106

Closed mariajribeiro closed 2 years ago

mariajribeiro commented 2 years ago

When trying to plot the results with clustering correction from a group comparison with 'two_samples_ttest' for one channel only using the gui, we get an error message.

We found that the problem was because in limo_stat_values lines 237-240 the number of dimensions expected for the variable bootM is wrong.

in line 232 bootM = squeeze(H0_data(:,:,1,:));

if we are using only one channel after the squeeze bootM has only 2 dim (not 3).

lines 236-241 should be: if size(M,1) == 1 tmp = NaN(1,size(M,2),size(bootM,2)); tmp(1,:,:) = bootM; bootM = tmp; tmp(1,:,:) = bootP; bootP = tmp; clear tmp end

Please confirm that our suggestion is adequate. Thanks!

Maria

CPernet commented 2 years ago

yes I could replicate the error and the fix - fix Maria Hope all is well with you -- fixed here https://github.com/LIMO-EEG-Toolbox/limo_tools/commit/8a2efd50e20036bf1b172c7fb657c6b2bc13af98