Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems combining data quality measures during the creation of a grand-average ERP #172

Open
Okmot94 opened this issue Jun 20, 2023 · 0 comments

Comments

@Okmot94
Copy link

Okmot94 commented Jun 20, 2023

Description

As recommended by Luck et al. (2021) I wanted to include the SME in my analysis pipeline.
Using the GUI once and the ERP.history command afterwards to include the used commands into my script leaves me with an an error as shown below.
When I try to do this the ERP.history commands provides me with:
ERP = pop_gaverager( ALLERP , 'DQ_flag', 2, 'DQ_spec', DQ_spec_structure, 'Erpsets', [1 2 3], 'ExcludeNullBin', on, 'SEM', on);

Obviously, it does not know what or where the DQ_spec_structure is since it produces this error message:
Unrecognized function or variable 'DQ_spec_structure'.

I also tried to adjust the code as given in the supplementary of the according paper where they create such a structure which they call "GAV_combo_spec".

GAv_combo_spec.measures = 1; % There is only one measure we want, bSME of onset latency
GAv_combo_spec.methods = 2;  % Combine via Root Mean Square
GAv_combo_spec.measure_names = {'bSME of onset latency'};
GAv_combo_spec.method_names = {'Pool ERPSETs, GrandAvg Mean','Pool ERPSETs, GrandAvg RMS'};
GAv_combo_spec.str = {'bSME of onset latency GrandAvg RMS'};

ERP = pop_gaverager( ALLERP2 , 'DQ_flag', 2, 'DQ_spec', GAv_combo_spec, 'Erpsets', 1:12 , 'ExcludeNullBin', 'on', 'SEM', 'on' );
ALLERP2(s+1) = ERP;
ALLERP2(s+1).erpname = 'GrandAverage';

I, however, wanted to include more than just one of the quality measures, i.e., all six I had, and adjusted it accordingly.

GAv_combo_spec.measures = 6; % The according number of the quality measures 
GAv_combo_spec.methods = 2;  % Combine via Root Mean Square
GAv_combo_spec.measure_names = {'Baseline Measures - SD', 'Point-wise SEM', 'aSME','bSME of mean amplitude','bSME of peak amplitude','bSME of peak latency'};
GAv_combo_spec.method_names = {'Pool ERPSETs, GrandAvg Mean','Pool ERPSETs, GrandAvg RMS'};
GAv_combo_spec.str = {'Baseline Measures - SD Pool ERPSEts, RMS GrandAvg combine', 'Point-wise SEM Pool ERPSETs, RMS GrandAvg combine', 'aSME Pool ERPSETs, RMS GrandAvg combine', 'bSME of mean amplitude Pool ERPSETs, RMS GrandAvg combine','bSME of peak amplitude Pool ERPSETs, RMS GrandAvg combine','bSME of peak latency Pool ERPSETs, RMS GrandAvg combine'};

%create grand average ERP (session-wise)
ERP = pop_gaverager( ALLERP , 'DQ_flag', 2, 'DQ_spec', GAv_combo_spec, 'Erpsets', 1:countERP(1,2), 'ExcludeNullBin', 'on', 'SEM', 'on' );

Even though this provides me with a grand average including a data quality measure, it only includes the first thus the "Baseline measures -SD" and seems to ignore the remaining 5 other data quality measures.

Maybe one of you has experienced the same problem or has a fix idea of what is wrong with my structure.

Thanks!


OS version [Windows 10 Enterprise]
Matlab version [R2022A]
EEGLAB version [2022.1]
ERPLAB version [9.10]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant