[Eeglablist] Error in std_envtopo

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Mon Oct 24 17:09:22 PDT 2016


Dear Martin,

> after which I save cleanEEG as a set (containing all conditions) and use
this in the STUDY.

Yes, but if your experimental design is event-related potential analysis,
you need to epoch your data first.

Makoto

On Thu, Oct 20, 2016 at 11:24 AM, Martin Randau <cmmrandau at gmail.com> wrote:

> Hello again Clement and Makoto
>
> I forgot to cc Makoto in my reply to Clement. My question is whether doing
> the following is the correct way when I want to run two ICA on the same
> dataset first on contionous data and again after removing bad epochs:
>
> contEEG = pop_runica(EEG);
>
> % removing epochs
>
> cleanEEG = pop_runica(contEEG);
>
>
>
> after which I save cleanEEG as a set (containing all conditions) and use
> this in the STUDY.
>
> Best wishes,
> Martin
>
> Venlig hilsen / Best wishes
> Martin
>
> Stud. Med.
> University of Copenhagen
>
> Center for Neuropsychiatric Schizophrenia Research (CNSR) & Center for
> Clinical Intervention and Neuropsychiatric Schizophrenia Research (CINS)
> Copenhagen University Hospital
> Psychiatric Centre Glostrup
> Ndr. Ringvej
> DK-2600 Glostrup
> Denmark
> e-mail: cmmrandau at gmail.com <nikolaj at cnsr.dk>
> phone: +45 42744285 <%2B45%203864%200844>
>
>
>
> 2016-10-20 18:33 GMT+02:00 Clement Lee <cll008 at eng.ucsd.edu>:
>
>> Oh yes I misread your question. I'm not too familiar with running ICA
>> twice, but doing it the way I wrote would NOT use the old ICA weights.
>>
>> On Thu, Oct 20, 2016 at 8:39 AM, Martin Randau <cmmrandau at gmail.com>
>> wrote:
>>
>>> Thank you Clement, I will try this. But don't you mean
>>>
>>> cleanEEG = pop_runica(contEEG) so that we apply the second ICA to
>>> contEEG that came out of the first ICA?
>>>
>>> Best wishes,
>>> Martin
>>>
>>> On Oct 18, 2016 21:47, "Clement Lee" <cll008 at eng.ucsd.edu> wrote:
>>>
>>>> No problem at all. Keep us posted and let us know if you run into any
>>>> problems.
>>>>
>>>> For scripting ICA twice, what you have should work as long as you save
>>>> after the first instance and before the second. Alternatively, it may be
>>>> better practice to use something like 'contEEG' and 'cleanEEG' as variable
>>>> names to keep a clear record.
>>>>
>>>>
>>>> contEEG = pop_runica(EEG);  % ica of continuous EEG
>>>>
>>>> %% remove bad epochs of EEG;
>>>>
>>>> % steps to clean bad epochs here in this section
>>>> %%
>>>>
>>>> cleanEEG = pop_runica(EEG) % ica of cleaned EEG
>>>>
>>>>
>>>> Of course, for any processes thereafter you would call 'contEEG' or
>>>> 'cleanEEG' instead of just 'EEG'.
>>>>
>>>> Clement
>>>>
>>>> On Tue, Oct 18, 2016 at 12:32 PM, Martin Randau <cmmrandau at gmail.com>
>>>> wrote:
>>>>
>>>>> Dear Clement and Makoto,
>>>>>
>>>>> Thank you for your replies. I think the problem was that I had created
>>>>> separate sets for each condition. I am currently re-processing my test data
>>>>> consisting of 30 subjects (15 patients and 15 controls) and expect this to
>>>>> be ready by Thursday (my computer is not the fastest available).
>>>>>
>>>>> My setup is EEG data on an oddball paradigm (standard stimulus,
>>>>> duration deviant, frequency deviant and frequency+duration deviant) in
>>>>> order to analyze MMN, much like the Rissling, Makeig et al article. We have
>>>>> data from about 100 subjects in total.
>>>>>
>>>>> I run a pre-processing pipeline much inspired by Makoto's pipeline but
>>>>> I run 2x ICA, one on continous data and one after removal of 5-10% bad
>>>>> epochs. I then create 4 separate sets for each stimulus type and load them
>>>>> into a STUDY as different conditions. This last part seems to be the
>>>>> problem!
>>>>>
>>>>> In my new setup I have one set per subject and divide the two groups
>>>>> (patient and control) as different 'conditions' instead of 'groups', and
>>>>> plan to use 'events' as markers for the stimulus types.
>>>>>
>>>>> I also had some problems using std_selectICsByCluster but I suspect
>>>>> this is also because I had different sets for the conditions.
>>>>>
>>>>> I will get back to you on Thursday or Friday when I have tested my new
>>>>> data.
>>>>>
>>>>> While I have you on the line, I have another question regarding
>>>>> running ICA twice. In my script I simply have EEG = pop_runica(EEG) twice,
>>>>> once before epoching and again after removing bad epochs. Is this the
>>>>> correct way, or am I running a new ICA and not including the old weights? I
>>>>> have read on the list about applying ICA weights to the data but I have not
>>>>> studied this further, as I assumed running pop_runica a second time
>>>>> automatically includes the old ICA.
>>>>>
>>>>> Once again, thank you for taking the time to help out! :)
>>>>>
>>>>> Venlig hilsen / Best wishes
>>>>> Martin
>>>>>
>>>>> Stud. Med.
>>>>> University of Copenhagen
>>>>>
>>>>> Center for Neuropsychiatric Schizophrenia Research (CNSR) & Center for
>>>>> Clinical Intervention and Neuropsychiatric Schizophrenia Research (CINS)
>>>>> Copenhagen University Hospital
>>>>> Psychiatric Centre Glostrup
>>>>> Ndr. Ringvej
>>>>> DK-2600 Glostrup
>>>>> Denmark
>>>>> e-mail: cmmrandau at gmail.com <nikolaj at cnsr.dk>
>>>>> phone: +45 42744285 <%2B45%203864%200844>
>>>>>
>>>>>
>>>>>
>>>>> 2016-10-18 21:06 GMT+02:00 Clement Lee <cll008 at eng.ucsd.edu>:
>>>>>
>>>>>> Sorry for your troubles Martin, and thanks for reporting the issue.
>>>>>> In addition to Makoto's questions, I'm curious if you used any optional
>>>>>> inputs while running std_envtopo, and whether or not you used an older
>>>>>> version of std_envtopo on the same dataset before downloading the current
>>>>>> version.
>>>>>>
>>>>>> Clement
>>>>>>
>>>>>> On Tue, Oct 18, 2016 at 12:51 AM, Makoto Miyakoshi <
>>>>>> mmiyakoshi at ucsd.edu> wrote:
>>>>>>
>>>>>>> Dear Martin,
>>>>>>>
>>>>>>> Sorry for inconvenience.
>>>>>>>
>>>>>>> Error using  *
>>>>>>> Inner matrix dimensions must agree.
>>>>>>>
>>>>>>> Error in std_envtopo (line 322)
>>>>>>>                         convTopoErp{1, cls}{columnwise,rowwise} =
>>>>>>> tmpTopo3*erp;
>>>>>>>
>>>>>>> Hmm this means you have different number of IC topos and ERPs. How
>>>>>>> could it be possible? I definitely need more info to troubleshoot this.
>>>>>>> What's your STUDY design, and how did you create STUDY? Did you, for
>>>>>>> example, separate conditions into different .set files?
>>>>>>>
>>>>>>> Makoto
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Oct 10, 2016 at 1:22 AM, Martin Randau <cmmrandau at gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hello all,
>>>>>>>>
>>>>>>>> I am having problems with the plugin std_envtopo. When running it
>>>>>>>> from the gui on a study composed of 2 groups with 4 conditions each fresh
>>>>>>>> after clustering I get this error:
>>>>>>>>
>>>>>>>> Error using  *
>>>>>>>> Inner matrix dimensions must agree.
>>>>>>>>
>>>>>>>> Error in std_envtopo (line 322)
>>>>>>>>                         convTopoErp{1, cls}{columnwise,rowwise} =
>>>>>>>> tmpTopo3*erp;  %min abs =
>>>>>>>>                         zero
>>>>>>>>
>>>>>>>> Error in gui_std_envtopo>startButton_Callback (line 560)
>>>>>>>> STUDY = std_envtopo(STUDY, ALLEEG, arguments{:});
>>>>>>>>
>>>>>>>> Error in gui_mainfcn (line 96)
>>>>>>>>         feval(varargin{:});
>>>>>>>>
>>>>>>>> Error in gui_std_envtopo (line 42)
>>>>>>>>     gui_mainfcn(gui_State, varargin{:});
>>>>>>>>
>>>>>>>> Error in
>>>>>>>> @(hObject,eventdata)gui_std_envtopo('startButton_Callback',h
>>>>>>>> Object,eventdata,guidata(hObject))
>>>>>>>>
>>>>>>>>
>>>>>>>> Error while evaluating uicontrol Callback
>>>>>>>>
>>>>>>>> Sometimes the error goes away after running the 'precompute
>>>>>>>> component measures' -> 'build preclustering array' -> 'cluster components'
>>>>>>>> but this is often not the case. I do not know what is causing the error, so
>>>>>>>> please let me know if you need more information. I am able to plot
>>>>>>>> everything (scalp maps, ERP, dipoles, power spectrum) from the 'edit/plot
>>>>>>>> clusters' menu. Number of sessions, conditions and groups are consistent in
>>>>>>>> the dataset.
>>>>>>>>
>>>>>>>>
>>>>>>>> Venlig hilsen / Best wishes
>>>>>>>> Martin
>>>>>>>>
>>>>>>>> Stud. Med.
>>>>>>>> University of Copenhagen
>>>>>>>>
>>>>>>>> Center for Neuropsychiatric Schizophrenia Research (CNSR) & Center
>>>>>>>> for Clinical Intervention and Neuropsychiatric Schizophrenia Research
>>>>>>>> (CINS)
>>>>>>>> Copenhagen University Hospital
>>>>>>>> Psychiatric Centre Glostrup
>>>>>>>> Ndr. Ringvej
>>>>>>>> DK-2600 Glostrup
>>>>>>>> Denmark
>>>>>>>> e-mail: cmmrandau at gmail.com <nikolaj at cnsr.dk>
>>>>>>>> phone: +45 42744285 <%2B45%203864%200844>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> 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
>>>>>>> Swartz Center for Computational Neuroscience
>>>>>>> Institute for Neural Computation, University of California San Diego
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>
>


-- 
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/20161024/b519dc04/attachment.html>


More information about the eeglablist mailing list