[Eeglablist] threshold option in std_plotcurve
Makoto Miyakoshi
mmiyakoshi at ucsd.edu
Thu Feb 9 18:55:01 PST 2017
Dear Susanne,
I gave up visualization using EEGLAB so I almost do everything myself.
Sorry for saying this. I'm not an EEGLAB developer anyway!
By the way did you try std_erpStudio() plugin? If you are using ICs and not
channels at STUDY, it should work. Yes I developed it for my colleagues and
myself.
Makoto
On Wed, Feb 8, 2017 at 8:32 AM, Becker, Susanne <
susanne.becker at zi-mannheim.de> wrote:
> Dear Makoto,
>
> unfortunately, GUI doesn’t support what I want to do for several reasons.
> First, I have more than 2 factors in my design (which I could get around by
> using subsets of the data in the STUDY and separate files), but more
> important and second, the contrast I'm most interested in is a subtraction
> of two conditions, and, third, I really like the depiction with error bands
> around the curve, which is only available with the std_plotcurve command
> and not via the GUI.
>
> I played around with the GUI a bit (using only two of my factors of
> interest) and realized that I’m not able to get the p-values plotted inside
> the plots (by setting the threshold option e.g to 0.05) and also that I’m
> not able to get the curves of my second factor, which has two levels,
> overlaid in one plot. I don’t see a reason as I don’t get any error
> messages and do everything as described in the tutorial. But I guess this
> suggests that there is something wrong with my data or the STUDY setup. Do
> you have any experience when such an error could occur?
>
> Thanks!
> Susanne
>
> Am 08.02.2017 um 04:14 schrieb Makoto Miyakoshi <mmiyakoshi at ucsd.edu>:
>
> Dear Susanne,
>
> Hmm honestly I don't have any experience in channel analysis on STUDY, so
> hard to say.
> Why do you need to use command line anyway? Doesn't GUI support what you
> want to do? If so, I wonder if you can try STUDY.history to obtain log of
> the executed code...
>
> > when I delete one line of g.val2mask as you suggested, it runs through
> and plots a picture including the p-values indicated plot the line by black
> and white bars as expected.
>
> This seems to suggest that something is wrong there, and erroneously two
> things are present. Without seeing actual code it's hard to say more than
> this. Any guess what these 'two things' correspond to, and how they should
> related to something else to make it work?
>
> Makoto
>
>
>
> On Sun, Feb 5, 2017 at 3:13 AM, Becker, Susanne <
> susanne.becker at zi-mannheim.de> wrote:
>
>> Dear Makoto,
>>
>> when I delete one line of g.val2mask as you suggested, it runs through
>> and plots a picture including the p-values indicated plot the line by black
>> and white bars as expected. However, the p-values are very different (not
>> such a big surprise since I delete this one line in g.val2mask).
>>
>> I my STUDY I have 2 factors, one with 8 levels (different conditions in
>> the task) and one with 2 levels (two drug conditions).
>> As I also want to plot some difference plot, I created a STUDY.design
>> using the graphical interface including both my factors, computed the ERPs
>> and computed all conditions using the GUI. Having the all the necessary
>> information in memory, I used for example this script:
>>
>> erp = STUDY.changrp(1,14).erpdata;
>> erptimes = STUDY.changrp(1,14).erptimes;
>>
>> contrasts_6 = { erp{1,3};
>> erp{1,4}};
>>
>> [F df pvals] = statcond(contrasts_6,'method', 'bootstrap'); % computes
>> repeated measure ANOVA
>>
>> pvals = {pvals};
>>
>> std_plotcurve(erptimes, contrasts_6, 'plotconditions', 'together',
>> 'plotstderr', 'on', 'figure', 'on', 'condstats', pvals, 'threshold',
>> [NaN] )
>>
>> std_plotcurve(erptimes, contrasts_6, 'plotconditions', 'together',
>> 'plotstderr', 'on', 'figure', 'on', 'condstats', pvals, 'threshold',
>> 0.05 )
>>
>> This is a very reduced version, since I tried to get it run with a very
>> simple comparison. Here I want to compare one condition of the task (factor
>> 1) between the two drug conditions (factor 2). The first std_plotcurve
>> command runs through and creates a figure with the two erps of the
>> conditions and the exact p-values in an extra plot. These p-values are
>> exactly the same comparted to when I plot pvals directly in a separate plot.
>> The second std_plotcurve command stops with the error message described
>> initially.
>>
>> Thanks very much for your help.
>> Susanne
>>
>>
>>
>>
>>
>> *Von: *Makoto Miyakoshi <mmiyakoshi at ucsd.edu>
>> *Betreff: **Aw: [Eeglablist] threshold option in std_plotcurve*
>> *Datum: *3. Februar 2017 19:51:56 MEZ
>> *An: *"Becker, Susanne" <susanne.becker at zi-mannheim.de>
>> *Kopie: *"eeglablist at sccn.ucsd.edu" <eeglablist at sccn.ucsd.edu>
>> *Antwort an: *<mmiyakoshi at ucsd.edu>
>>
>>
>> Dear Susanne,
>>
>> > I saw that ‚g.maskarray‘ is also 150 columns long but has only one
>> line. Might this somehow related to the error?
>>
>> That could be it.
>> While using a debug mode and on the line of code you get error, can you
>> delete one of the two lines in g.val2mask in this way
>>
>> g.val2mask = g.val2mask(1,:);
>>
>> to make sure it works?
>>
>> Because I don't know anything about your STUDY design, I don't know what
>> it means to have two lines in g.val2mask. Do you know what these two lines
>> corresponds to your factorial design?
>>
>> Makoto
>>
>>
>> On Thu, Feb 2, 2017 at 11:50 AM, Becker, Susanne <
>> susanne.becker at zi-mannheim.de> wrote:
>>
>>> Dear Makoto,
>>>
>>> thank you very much for our help. I’ll report the problem to the EEGLAB
>>> Bugzilla in a second.
>>>
>>> I checked the length of 'Rregions‘ and ‚g.val2mask‘ using the debug
>>> mode. They are of the same length, both 150 columns with 2 lines each.
>>> However, I don’t know if it is relevant, I saw that ‚g.maskarray‘ is also
>>> 150 columns long but has only one line. Might this somehow related to the
>>> error?
>>> If I just run the line (in debug mode):
>>> find(g.val2mask < g.maskarray)
>>>
>>> I get this error mask, i.e. the same as when running the std_plotcurve
>>> command.
>>> Error using <
>>> Matrix dimensions must agree.
>>>
>>> Thanks
>>> Susanne
>>>
>>>
>>> Am 02.02.2017 um 20:30 schrieb Makoto Miyakoshi <mmiyakoshi at ucsd.edu>:
>>>
>>> Dear Susanne,
>>>
>>> Sorry for the trouble.
>>> Could you report it to EEGLAB Bugzilla by filing the case? Those reports
>>> submitted here will be directly read by developpers.
>>> https://sccn.ucsd.edu/bugzilla/enter_bug.cgi
>>> I appreciate your patience and cooperation.
>>>
>>> Meanwhile, for the initial diagnosis... judging from the error message,
>>> 'Rregions' and 'g.val2mask' seem to have different length. Can you identify
>>> the size of these variables by using debug mode? If you can do it and the
>>> error is obvious, we may be able to solve it by ourselves.
>>>
>>> Makoto
>>>
>>>
>>>
>>> On Thu, Feb 2, 2017 at 4:49 AM, Becker, Susanne <
>>> susanne.becker at zi-mannheim.de> wrote:
>>>
>>>> Dear all,
>>>>
>>>> I’m using the std_plotcurve function to plot ERPs in two different
>>>> conditions. I wanted to used the option „threshold“ with 0.05 as a
>>>> significance threshold. However, when using the following commend I get an
>>>> error message:
>>>>
>>>> std_plotcurve(erptimes, contrasts_5(:,1), 'plotconditions', 'together',
>>>> 'plotstderr', 'on', 'figure', 'on', 'condstats', pvals, 'threshold',
>>>> 0.05 )
>>>>
>>>> Calculating the stats before with:
>>>> [F df pvals] = statcond(contrasts_5(:,1),'method', 'bootstrap‘);
>>>>
>>>> The error message I get is:
>>>> Error using <
>>>> Matrix dimensions must agree.
>>>>
>>>> Error in plotcurve (line 104)
>>>> Rregions (find(g.val2mask < g.maskarray)) =
>>>> 0;
>>>>
>>>> Error in std_plotcurve (line 400)
>>>> plotcurve( allx, tmpdata{1}, 'colors', tmpcol,
>>>> 'maskarray',
>>>> tmpdata{2}, plotopt{3:end}, 'title',
>>>> opt.titles{c,g});
>>>>
>>>> If I use NaN for the threshold option it works perfectly well. Can
>>>> anybody tell me what I’m doing wrong?
>>>> Best wishes
>>>> Susanne
>>>>
>>>>
>>>> -------------------------------------------------------
>>>> Susanne Becker, PhD
>>>> Head of Research Unit "Psychobiology of Pain“
>>>>
>>>> Department of Cognitive and Clinical Neuroscience
>>>> Central Institute of Mental Health
>>>> J5, 68159 Mannheim, Germany
>>>> Phone: +49 (0)621 1703-6307 <+49%20621%2017036307>
>>>> Fax: +49 (0)621 1703-6305 <+49%20621%2017036305>
>>>> Email: susanne.becker at zi-mannheim.de
>>>>
>>>>
>>>> _______________________________________________
>>>> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
>>>> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.uc
>>>> sd.edu
>>>> For digest mode, send an email with the subject "set digest mime" to
>>>> eeglablist-request at sccn.ucsd.edu
>>>>
>>>
>>>
>>>
>>> --
>>> Makoto Miyakoshi
>>> Swartz Center for Computational Neuroscience
>>> Institute for Neural Computation, University of California San Diego
>>>
>>>
>>> -------------------------------------------------------
>>> Susanne Becker, PhD
>>> Head of Research Unit "Psychobiology of Pain“
>>>
>>> Department of Cognitive and Clinical Neuroscience
>>> Central Institute of Mental Health
>>> J5, 68159 Mannheim, Germany
>>> Phone: +49 (0)621 1703-6307 <+49%20621%2017036307>
>>> Fax: +49 (0)621 1703-6305 <+49%20621%2017036305>
>>> Email: susanne.becker at zi-mannheim.de
>>>
>>>
>>
>>
>> --
>> Makoto Miyakoshi
>> Swartz Center for Computational Neuroscience
>> Institute for Neural Computation, University of California San Diego
>>
>>
>> _______________________________________________
>> eeglablist mailing list eeglablist at sccn.ucsd.edu
>> Eeglablist page: http://www.sccn.ucsd.edu/eeglab/eeglabmail.html
>> To unsubscribe, send an empty email to eeglablist-unsub at sccn.ucsd.edu
>> To switch to non-digest mode, send an empty email to
>> eeglablist-nodigest at sccn.ucsd.edu
>>
>>
>> -------------------------------------------------------
>> Susanne Becker, PhD
>> Head of Research Unit "Psychobiology of Pain“
>>
>> Department of Cognitive and Clinical Neuroscience
>> Central Institute of Mental Health
>> J5, 68159 Mannheim, Germany
>> Phone: +49 (0)621 1703-6307 <+49%20621%2017036307>
>> Fax: +49 (0)621 1703-6305 <+49%20621%2017036305>
>> Email: susanne.becker at zi-mannheim.de
>>
>>
>
>
> --
> Makoto Miyakoshi
> Swartz Center for Computational Neuroscience
> Institute for Neural Computation, University of California San Diego
>
>
> -------------------------------------------------------
> Susanne Becker, PhD
> Head of Research Unit "Psychobiology of Pain“
>
> Department of Cognitive and Clinical Neuroscience
> Central Institute of Mental Health
> J5, 68159 Mannheim, Germany
> Phone: +49 (0)621 1703-6307 <+49%20621%2017036307>
> Fax: +49 (0)621 1703-6305 <+49%20621%2017036305>
> Email: susanne.becker at zi-mannheim.de
>
>
--
Makoto Miyakoshi
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/20170209/407f3e45/attachment.html>
More information about the eeglablist
mailing list