[Eeglablist] Ploting ONLY stat stignificant ERSP ina study

Arnaud Delorme arno at ucsd.edu
Sat Jan 12 22:19:00 PST 2013


Dear Aleksandra,

no that does not change anything. I agree with Makoto that we should find a way to plot difference with baseline in ERSP. It is not too hard from the command line. Afer computing ERSP in the graphic interface for your STUDY, first retrieve ERSP results on one channel.

[STUDY ersp times freqs ] = std_erspplot(STUDY,ALLEEG,'channels',{'T7'});

size(ersp{1})

ans =

    30    40     1     12

30 frequencies, 40 time points, 1 electrode, 12 subjects.
Now to compare the baseline to 0, one simple way is to do this is

% permutation statistics with FDR correction
pvals = std_stat({ ersp{1} zeros(size(ersp{1})) }', 'method', 'permutation', 'condstats', 'on', 'correctm', 'fdr');  

Or

% permutation statistics with cluster correction (note: use the latest SVN revision of EEGLAB 12)
pvals = std_stat({ ersp{1} zeros(size(ersp{1})) }', mode', 'fieldtrip', 'fieldtripmethod', 'montecarlo', 'condstats', 'on', 'fieldtripmcorrect', 'cluster'); 

Note that only surrogate method is appropriate here (the array containing zeros array has 0 variance so cannot be used in parametric tests).
Now plot the ERSP masked for significance.

tmpersp = mean(ersp{1},4); % average ERSP for all subjects
tmpersp(pvals{1} > 0.05) = 0; % zero out non-significant values
figure; imagesc(times, freqs, tmpersp); set(gca, 'ydir', 'normal'); xlabel('Time (ms)'); ylabel('Frequencies (Hz)'); cbar; % plot ERSP

Best,

Arno

On 11 Jan 2013, at 04:25, Aleksandra Vuckovic wrote:

> Dear Makoto,
> at the moment I am working simply with EEG data not ICA components (though that will be my next step).
> Does that change anything?
> Many thanks,
> Aleksandra
>  
> From: Makoto Miyakoshi [mmiyakoshi at ucsd.edu]
> Sent: 10 January 2013 23:12
> To: Aleksandra Vuckovic
> Cc: eeglablist at sccn.ucsd.edu; Muhammad Hasan; Arnaud Delorme; Scott Makeig
> Subject: Re: [Eeglablist] Ploting ONLY stat stignificant ERSP ina study
> 
> Dear Aleksandra,
> 
> So you want to show simple effect of ERSP results after significance masking. Actually it is not possible for the current STUDY scheme (!) which is a shame. You need to write a code to extract those values from STUDY.cluster(1,x).icaersp. Type 'help std_readersp' and read the help for a start.
> 
> I strongly believe that this should be doable, so I cc this to Arno and Scott to draw their attention.
> 
> Makoto
> 
> 2013/1/4 Aleksandra Vuckovic <Aleksandra.Vuckovic at glasgow.ac.uk>
> Hi,
> how can I plot only statistically significant ERSP (let's say p<0.05) in a study, in the same way as it can be plotted for a single subject? Currently I can only plot a separate figure with an area of statistically significant difference between two groups rather than statistically significant ERSP of a single group/single condition.
> Many thanks,
> Alex
> 
> _______________________________________________
> 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
> 
> 
> 
> -- 
> Makoto Miyakoshi
> JSPS Postdoctral Fellow for Research Abroad
> Swartz Center for Computational Neuroscience
> Institute for Neural Computation, University of California San Diego

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20130112/b880a50e/attachment.html>


More information about the eeglablist mailing list