[Eeglablist] ERSP Difference of 2 conditions across frequency bands

Deepika Saraswathy Kurup dkurup at stanford.edu
Fri Aug 14 00:47:20 PDT 2020


Dear EEGLAB Community,



My name is Deepika and I am a medical student looking to analyze the difference in ERSPs across two conditions (Pre and Post) for 9 subjects, and then average across subjects. I have successfully plotted ERSPs for both conditions and the ERSP difference by running the following line for each subject (E59 is the channel I am looking at):



[erspDiff1,itcDiff1,powbaseDiff1,timesDiff1,freqsDiff1,erspbootDiff1,itcbootDiff1, tfdataDiff1] = newtimef({Post1.data(Post1E59,:,:) Pre1.data(Pre1E59,:,:)}, Pre1.pnts, [1000*Pre1.xmin 1000*Pre1.xmax], Pre1.srate);



I can average ERSPs of all subjects by adding all the erspDiff values from each subject and dividing by the number of subjects like below



erspAvgAll = (erspDiff1{1,3} + erspDiff2{1,3} + erspDiff6{1,3} + erspDiff7{1,3} + erspDiff9{1,3} + erspDiff10{1,3} + erspDiff15{1,3} + erspDiff16{1,3} + erspDiff17{1,3})/9;



Now I am looking to analyze these ERSPDiff and erspAvgAll values averaged across frequency bands. If I run newtimef() to get ERSPs for a single subject, I can add parameters like 'freqs', [4 30] to only output frequencies of a certain range, but when I try to add parameters when using newtimef() for two conditions, I am unable to do so.



1) How can I look at ERSPs across frequency bands for the difference of two conditions?



I am also now thinking that in order to get statistical measures from eeglab, I should use a STUDY.



I can create a study by loading all my datasets, re-epoching them so all epochs are the same length, and then creating a study with the re-epoched data. However, every time I try to compute ERSPs through 'pre-compute channel measures', I get 'Error while calling function, check syntax'. I am not sure where this error is as I am using the pre-set parameters.



2) How can I use STUDY to look at ERSPs across specific frequency bands for the difference of two conditions?



Thank you in advance for your guidance!



Sincerely,



Deepika

__________________________________
Deepika Kurup
Stanford School of Medicine | MD Candidate, M2
Harvard University | A.B. Neuroscience



More information about the eeglablist mailing list