[Eeglablist] Why do different methods for measuring power give such different results?

Carlos Andrés Guerrero M. cguerrero76 at yahoo.com
Thu Sep 11 03:00:13 PDT 2014


Dear Dorothy.

Just some comments.
*  newtimef script calculates the mean of log spectral across the epochs. 
* spectopo uses pwelch for psd's calculation for a single input time series.
* pop_eegfilt makes a filtering in time domain. NOT frequency domain (as above). 
 

I have tested with my EEG data and I obtained similar results between spectopo and typical PSD analysis. For example,

mydata=EEG.data(7,:,:); % EEG channel
[spectra,freqs] = spectopo(mydata, 0,200,'plot','off'); % this script uses Welch estimation
myspec=pwelch(mydata,512,0,1024,200); % psd computation by Welch. 
% (data, windowlength,overlap,ffftsize,fsampling)
figure,plot(spectra)
figure,semilogy(myspec)
 
I think that differences are oriented to how the methods calculate the psd. About newtimef.m, I have more doubts about it, but I suposse it could be the same.  

Best

Carlos Guerrero-Mosquera
Research Centre of Cognition and Neurosciences (CRNC)-UR2NF
Bruxelles
On Wednesday, September 10, 2014 6:01 PM, Dorothy Bishop <dorothy.bishop at psy.ox.ac.uk> wrote:
 


 
Dear All
 
I am trying to compute power in the mu frequency range, 8-13 Hz.
I've tried 3 different methods for doing this which I thought would be broadly equivalent: However, for the same data, I get very different results depending on the method I use.
If results were just a linear transform of one another, I would not be bothered, but it’s more serious than that.
I am comparing power for 5 different conditions, and when I plot the power for each condition, the pattern of results across conditions is completely different depending on what I do.
I've provided my pared-down scripts below. I'd be grateful if someone could let me know if I’m doing something wrong, or if I've just misunderstood how these functions work. 
I’d be happy to provide fuller examples if need be.
 I'm running eeglab6.1 with matlabR2009b. Many thanks
 
With the identical data, I have tried:
%1.       Using FFT via newtimef,
%mydata is subset of EEG.data for trials for given condition and electrode, squeezed to 2D
mydata=squeeze(EEG.data(18,:,:));%electrode 18 is C3
cycles=0;
[ersp,itc,powbase,times,freqs]=...
    newtimef( mydata,EEG.pnts,[EEG.xmin EEG.xmax]*EEG.srate, EEG.srate, cycles, 'baseline',NaN,'plotitc','off','plotersp','off');
murange = find(freqs>8 & freqs<13);
mypowermean=(mean(ersp(murange,:),2));
allmu=mean(mypowermean)

 
%2.       Using spectopo,
% thisdata is subset of trials from EEG data for 1 electrodes and a given condition
thisdata=EEG.data(18,:,:);
[spectra,freqs] = spectopo(thisdata, 0, EEG.srate,'plot','off');
murange2 = find(freqs>8 & freqs<13);
allmu2 = mean(spectra(murange2),2)
 
%3. Computing power from EEG.data after bandpass filtering at 8-13 Hz
% mydata is EEG.data for given electrode and condition, squeezed to 2D
f1=8;f2=13;
EEG= pop_eegfilt(EEG,0,f2, [], [0]); % Low pass filter with cutoff freq f2 Hz
EEG = eeg_checkset(EEG );
EEG= pop_eegfilt(EEG,f1,0, [], [0]); % High pass filter with cutoff freq f1 Hz
EEG = eeg_checkset(EEG );
mydata=squeeze(EEG.data(18,:,:));%electrode 18 is C3
mydamean=mean(mydata,2);
mydavoltsq=mydamean.^2;
myvoltsq=mean(mydavoltsq);
allmu3=10*log10(myvoltsq/10);

  
 


Dorothy Bishop, Professor of Developmental Neuropsychology,
Dept of Experimental Psychology, University of Oxford, OX1 3UD.
tel +44 (0)1865 271369; fax +44 (0)1865 281255;
WEB: www.psy.ox.ac.uk/oscci
Blog: http://deevybee.blogspot.com/
Raising Awareness of Language Learning Impairments! See www.youtube.com/RALLIcampaign
_______________________________________________
Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20140911/af2c5b31/attachment-0001.html>


More information about the eeglablist mailing list