[ALLEEG EEG CURRENTSET ALLCOM] = eeglab; % Load all condition data of each subject (SO1, SO2, ...) and condition % (C1,C2). Each Data set contains all trials (e.g. 80 trials) for a subject and given condition. [STUDY ALLEEG] = std_editset( STUDY, ALLEEG, 'name','Test','updatedat','off','commands',{... {'index' 1 'load' S1_C1.set' 'subject' 'S01' 'condition' 'C1'} ... {'index' 2 'load' S1_C1.set' 'subject' 'S01' 'condition' 'C1'} ... {'index' 3 'load' S1_C1.set' 'subject' 'S02' 'condition' 'C2'} ... {'index' 4 'load' S1_C1.set' 'subject' 'S02' 'condition' 'C2'} ... } ); pop_savestudy( STUDY, EEG ) %load existing STUDY [ALLEEG EEG CURRENTSET ALLCOM] = eeglab; [STUDY, ALLEEG] = std_checkset(STUDY, ALLEEG); [STUDY ALLEEG] = pop_loadstudy('filename', 'Test.study', 'filepath', '/Whatever'); CURRENTSTUDY = 1; EEG = ALLEEG; CURRENTSET = [1:length(EEG)]; % The following code is created by working with the GUI % The GUI was used the following way % Plot channel measures % --> Stats % - activate "Compute 1st independent variable stats" % - Use fieldtrip stats % > Montecarlo/permutation stats + Cluster correction % > Statistical threshold = 0.05 % > Randomization = auto % > CC channel neighbor parameters == ‘method’, ‘distance’ % > Cc cluster parameters == 'clusterstatistic','maxsum' STUDY = pop_statparams(STUDY, 'condstats','on','mode','fieldtrip','fieldtripmethod','montecarlo','fieldtripalpha',0.05,'fieldtripmcorrect','cluster'); STUDY = pop_erpparams(STUDY, 'plotconditions','together','topotime',[]); STUDY = std_erpplot(STUDY,ALLEEG,'channels',{'Fp1' 'AF7' 'AF3' 'F1' 'F3' 'F5' 'F7' 'FT7' 'FC5' 'FC3' 'FC1' 'C1' 'C3' 'C5' 'T7' 'TP7' 'CP5' 'CP3' 'CP1' 'P1' 'P3' 'P5' 'P7' 'P9' 'PO7' 'PO3' 'O1' 'Iz' 'Oz' 'POz' 'Pz' 'CPz' 'Fpz' 'Fp2' 'AF8' 'AF4' 'AFz' 'Fz' 'F2' 'F4' 'F6' 'F8' 'FT8' 'FC6' 'FC4' 'FC2' 'FCz' 'Cz' 'C2' 'C4' 'C6' 'T8' 'TP8' 'CP6' 'CP4' 'CP2' 'P2' 'P4' 'P6' 'P8' 'P10' 'PO8' 'PO4' 'O2'}); CURRENTSTUDY = 1; EEG = ALLEEG; CURRENTSET = [1:length(EEG)];