LIMO-EEG-Toolbox / limo_tools

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

Error during 2nd level analysis: Unrecognized function or variable 'matched_data' #57

Closed CarlosRR86 closed 3 years ago

CarlosRR86 commented 3 years ago

Hello,

First, I wanted to thank you for such a wonderful toolbox.

I am having some troubles when trying to analyze my data. I followed Makoto's pre-processing pipeline (https://sccn.ucsd.edu/wiki/Makoto's_preprocessing_pipeline), then I created a study with the datasets already processed, and followed the LIMO tutorial for preparing the analyses.

Two errors have appeared:

"File name required to save the study, (Error occurred in function pop_savestudy() at line 116)"

"Unrecognized function or variable 'matched_data'.

Error in limo_random_select (line 1158) data(:,:,:,matrix_index) = matched_data;

Error in limo_random_effect>ANOVA_Callback (line 265) limo_random_select(answer,handles.chan_file,'nboot',handles.b,'tfce',handles.tfce,'type','Channels');

Error in gui_mainfcn (line 95) feval(varargin{:});

Error in limo_random_effect (line 29) gui_mainfcn(gui_State, varargin{:});

Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)limo_random_effect('ANOVA_Callback',hObject,eventdata,guidata(hObject)) Error while evaluating UIControl Callback."

This error stops the analysis, and I can never proceed to the window where the ANOVA model is presented.

If you could help me with these errors, that would be amazing.

Kind regards, Carlos Romero-Rivas

CPernet commented 3 years ago

Hi Carlos,

2 things: (1) your study doesn't have a name which is not recommended (it will work but files can end up being at the wrong place, or mixed up if you create different designs; (2) LIMO.Type is somehow missing which create your error (I just added a catch for that in the next release coming out next week) - this is usually specified when calling pop_limo see e.g. https://github.com/LIMO-EEG-Toolbox/limo_meeg/wiki/2.-One-way-repeated-measures-ANOVA-(Famous,-Unfamiliar,-Scrambled-faces-as-conditions)

are you trying to run LIMO on IC? hasn't been fully tested but happy to support you in this thx

CarlosRR86 commented 3 years ago

Hi Cyril,

Many thanks for your kind response.

Error 1 fixed.

However, the second error still appears, even if running the code directly... As you suggested, it might be caused by running LIMO on IC (I need a remote VPN connection to my institution in order to run Matlab). I will try to find another version of Matlab that does not require a VPN connection. Hopefully that will do (I will keep you posted).

Kind regards, Carlos

CPernet commented 3 years ago

please try the STUDY interface see if IC runs - pop_limo sould also take ''ica'' as argument in let me know, we can fix any issue you have (hopefully)

CarlosRR86 commented 3 years ago

Hi Cyril,

I run the analyses using the STUDY interface (that is, not using LIMO, but STUDY statistics), and it worked just fine. However, when I try to run the analyses on LIMO, the same error keeps appearing (error 2 in my first post); this is the case both when using the LIMO interface or the code provided in the tutorials.

Just to be sure (sorry, I am kind of a Matlab-EEGLAB dummy):

Many thanks again for all your help. Carlos

CPernet commented 3 years ago

Hi Carlos, try using https://github.com/LIMO-EEG-Toolbox/limo_tools/tree/HotFixes see if that solves your problem --> for ICA in the interface estimate model on ica --> for pop_limo you pass icaerp instead of daterp (see pop_limo help)

CPernet commented 3 years ago

data(:,:,:,matrix_index) = matched_data; error is because it can't parse the data between subject, either matching IC (from ica) or channel

if https://github.com/LIMO-EEG-Toolbox/limo_tools/tree/HotFixes doesn't solve it, share a few subjects on google drive and I'll have a look