[Eeglablist] Plotting ERSP condition differences in STUDY

Grace Leslie grace.leslie at gmail.com
Fri Mar 1 17:59:31 PST 2013


Hi Burcu,

This is how I implemented a significance masking for an ERSP
difference plot for my own study.

STUDY = pop_statparams(STUDY, 'condstats','on','alpha',0.05);

for i = allClusters
figure;
[STUDY erspdata ersptimes erspfreqs pgroup pcond pinter] =
std_erspplot(STUDY,ALLEEG,'clusters',i, 'plotsubjects', 'on');
meanERSPcond1 = mean(erspdata{1},3);
meanERSPcond2 = mean(erspdata{2},3);

maskedImage = (meanERSPcond1-meanERSPcond2).*(cell2mat(pcond));

std_plottf(ersptimes, erspfreqs, mat2cell(maskedImage),'titles',{['Cls
' num2str(i) ' ERSP, Condition1 - Condition2, p < .05']});

Grace Leslie
UCSD

---------- Forwarded message ----------
From: "Burcu Ayşen Ürgen" <burgen at cogsci.ucsd.edu>
To: Arnaud Delorme <arno at ucsd.edu>
Cc: eeglablist at sccn.ucsd.edu
Date: Thu, 28 Feb 2013 10:38:22 -0800
Subject: Re: [Eeglablist] Plotting ERSP condition differences in STUDY
Dear Arno and eeglablist,

Once the ERSP condition differences are plotted, is there also a way
to mask the difference plot with the significant values (e.g. p<0.05
FDR corrected)?

Thanks,

Burcu

On Mon, Feb 25, 2013 at 9:07 PM, Arnaud Delorme <arno at ucsd.edu> wrote:
>
> Dear Pete,
>
> something like this could help for single channels
>
> [STUDY ersp times freqs] = std_erspplot(STUDY,ALLEEG, 'channels',{'OZ'});
> erspDiff = ersp{2}-ersp{1};
> erspDiff = mean(erspDiff, 4); % average across subjects
> figure; tftopo(erspDiff, times, freqs);
>
> For scalp topographies
>
> chanlocs = eeg_mergelocs(ALLEEG.chanlocs);
> [STUDY ersp times freqs] = std_erspplot(STUDY,ALLEEG, 'channels',{ chanlocs.labels }, 'topotime', [200 400], 'topofreq', [8 12]);
> erspDiff = ersp{2}-ersp{1};
> erspDiff = mean(erspDiff, 4);
> figure; topoplot(erspDiff, chanlocs);
>
> Best,
>
> Arno
>
> On 25 Feb 2013, at 18:39, Makoto Miyakoshi wrote:
>
> Dear Pete,
>
> This is what I wrote 5 days ago for a similar question to the list. I hope this helps.
>
> %%%%%%%%%%%%%%%%%%%%
> If you don't mind doing a little hack here is description of how to do it. Here I show you the case of ICA-based clustering, not channel, but they should be more or less the same I guess (I hope).
>
> 1. Plot 'Edit/plot clusters.'
> 2. Show all ERSPs.
> 3. Close it by pressing 'ok'. This updates your STUDY.
> 4. You should be able to find STUDY.cluster(1,x).icaerspwhich is a cell that contains group x condition data (each of them have the size of frequency x timepoint).
> 5. You select pick them up to calculate subtraction. You can also find frequency and time scales there.
> 6. FYI to plot time-frequency plot use 'imagesc(); axis xy'.
>
> Sorry I can't provide exactly matched information. If you find this method does not help much let me know.
> %%%%%%%%%%%%%%%%%
>
> Maybe I should write a little plug-in for this. Sorry for this apparent inconvenience.
>
> Makoto
>
> 2013/2/25 Pete Manza <pete.manza at gmail.com>
>>
>> Hello all,
>>
>> I know there have been several posts on this but I haven't been able to make sense of how to proceed with my own code, as I'm not an experienced MATLAB user.
>>
>> I was wondering if anyone would be willing to share some code for plotting the ERSP subtraction of conditions (i.e., Condition A - Condition B): at the single channel level and if possible, for scalp maps of the difference also.  (And, if it's necessary, code for precomputing the difference -- do you have to precompute the difference first in order to plot it?  There was some disagreement in one of the older threads I had seen.)
>>
>> I'm working within a STUDY design.  I'm not using ICA-based clusters, just channels.
>>
>> Thanks very much for the help!
>> Pete Manza
>> Stony Brook University
>>
>> _______________________________________________
>> 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
> _______________________________________________
> 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
>
>
>
> _______________________________________________
> 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




--
Burcu Aysen Urgen, PhD candidate
Department of Cognitive Science
University of California, San Diego

Email: burgen at cogsci.ucsd.edu




More information about the eeglablist mailing list