[Eeglablist] cluster ERP projected on scalp electrodes

Marco Bellami mrcbellami at gmail.com
Mon Jun 10 10:25:46 PDT 2013


Hi All,

I performed an ICA decomposition on my raw EEG data (for each subject 
and condition). Then, I created a STUDY and a design and I clustered ICs.
Now, I want to calculate, for each cluster and condition of my design, 
the projection of the ERP of the cluster on the channels and I'd like to 
know if my approach is correct.
First, I calculated the projection on the scalp of each  component of 
each cluster (using the icaproj function). Then, I averaged the 
projected ERPs between the components of the same cluster:

for example,  let clust=1

  for cond = 1:total_conditions % choose a condition (from STUDY.condition)

         % compute average cluster ERP projected on EEG channels

         for ic = 1:length(STUDY.cluster(clust).allinds{cond}) % for 
each component in the cluster

             design_idx = STUDY.cluster(clust).setinds{cond}(1,ic);
             setidx = STUDY.design(design_number).cell(design_idx).dataset;
             %select the component
             comp = STUDY.cluster(clust).allinds{cond}(1,ic);
             %load the dataset with the selected component
             [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, 
CURRENTSET,...
             'retrieve',setidx,'study',CURRENTSTUDY);

             winvs = 
ALLEEG(setidx).icawinv(:,:)*STUDY.cluster(clust).topopol(ic);
             % calculate the projection of the IC on all channels
prjics(:,:,ic)=icaproj2(mean(ALLEEG(setidx).data(:,:,:),3),pinv(winvs),comp); 

         end;
         %average projection over trials
         prjclus=mean(prjics,3);

Thanks,

Marco




More information about the eeglablist mailing list