<div dir="ltr">Hi Andreas and Tarik<br><br>Thanks for your feedback,<br><br>I have no 
extensive experience with ICA. We do not include the EOG channels 
because we had bipolar EOG electrodes, and these EOG should be included 
as long as they are referenced together, right?<br><br>However, I did a test running ICA as Andreas suggested<span class="gmail-im"><br><span style="color:rgb(0,0,255)">EEG = pop_runica(EEG, 'icatype', 'runica', 'extended', 1, 'interupt', 'on', 'pca', EEG.nbchan-1);</span><br><br></span>I
 then removed the bads ICs and reinject the weights to my unfiltered 
dataset and now it looks good! So effectively the problem came from the 
fact I did the wrong ICA,<br><br>Just for clarification regarding the ICA:<br>In
 Makoto's pipeline one can read: "the easy way to make the data 
full-ranked is to discard (any) one channel after average referencing. 
If you don't do this, ICA may return invalid results" it isn't correct? I
 think our confusion cames from here,<br><br>Also, since the ICA seems to run well with EOG channels included, doesn't really matter if the EOGs are bipolar electrodes?<br><br>Many thanks for your time,<br><br>Jose</div><div class="gmail_extra"><br><div class="gmail_quote">On 26 May 2017 at 11:12, Andreas Widmann <span dir="ltr"><<a href="mailto:widmann@uni-leipzig.de" target="_blank">widmann@uni-leipzig.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jose,<br>
<span class=""><br>
> I went to back to my pipeline.<br>
> When I did ICA I set the rank to: all channels minus 3 (-1 due to the average reference and -2 due to both EOG channels)<br>
</span>One cannot "set" the rank. The rank is an inherent property of the data. What is the problem with your EOG channels? Most commonly it is recommended to include the EOG channels into ICA.<br>
<span class=""><br>
>     EEG = pop_runica(EEG, 'icatype', 'runica', 'extended', 1,'interupt', 'on','chanind', [1:EEG.nbchan-3]);<br>
</span>Using the 'chanind' option you define which channels should be included into the computation of the ICA decomposition. Thus, you excluded the last three channels from the decomposition. Why? You cannot apply the resulting decomposition to a dataset including these three channels. If you assume or know that your data are rank reduced you may use the 'pca' option of runica to reduce the dimensionality of the data. Excluding channels will not help.<br>
<br>
Hope this helps! Best,<br>
Andreas<br>
<span class="im HOEnZb"><br>
> So, for a given subject the dimensions for the icachansind, icasphere, and icaweights variables were 1x63, 63x63 and 43x63 (so 66 [64 EEG channels + 2 EOG channels] -3). However, for this same subject the number of channels for the unfiltered dataset is 66. I think this is inconsistency is screwing up my data, however I don't know how this should be done to overcome my problem,<br>
</span><div class="HOEnZb"><div class="h5">> Am 25.05.2017 um 15:22 schrieb José Luis <<a href="mailto:joseluisulloafulgeri@gmail.com">joseluisulloafulgeri@gmail.<wbr>com</a>>:<br>
><br>
> dear community,<br>
><br>
> I'm performing analysis of EEG data, which I want to explore for ERP and TF analysis. I aimed at performing two separated analyses, one with filtered data (for ERPs) and another with unfiltered data (for TF, also because I want to see high frequency oscillations),<br>
><br>
> I applied ICA to the filtered data to get ride of ocular and other artifacts. Next, I wanted to inject the weights of the ICA into the unfiltered data. Unfortunately I didn't find too much documentation about this, so I hope this will be useful for other users that want to do this (if there is any documentation please let me know).<br>
><br>
> What I did was the following:<br>
> 1) In a first step I eliminated the bad components of my filtered data so I get an ICA-pruned dataset,<br>
> 2) Next, I save the ICA variables from my ICA-pruned data set,<br>
>     icachansind = EEG.icachansind;<br>
>     icasphere = EEG.icasphere;<br>
>     icaweights = EEG.icaweights;<br>
> 3) Next, I load my unfiltered data. I make sure any bad channel that need to be removed was removed, and that the data was re-referenced to the average reference. I'm not certain that the average reference is very important, but regarding the bad channels I know that if I inject ICA weights from another dataset they need to have the same number of channels, so if I remove one channel when I perform ICA on the filtered data I need to remove one channel in the unfiltered data to apply the ICA weights. Next, I load the mat files that I save in step 2, and I edit the unfiltered dataset with:<br>
>     EEG = pop_editset(EEG, 'icachansind', 'icachansind', 'icaweights', 'icaweights', 'icasphere', 'icasphere');<br>
>     EEG = eeg_checkset(EEG);<br>
> to integrate the ICA information in the unfiltered dataset. Next, I sort of apply the ICA decomposition with:<br>
>     EEG = pop_subcomp(EEG, [ ], 0);<br>
>     EEG = eeg_checkset(EEG);<br>
> and this certainly eliminate the ocular movements of my unfiletered dataset,<br>
> 4) Next, I interpolated if this is necessary with;<br>
>     EEG = pop_interp(EEG, orichannels, 'spherical');<br>
>     EEG = eeg_checkset(EEG);<br>
> the orichannels correspond to the orginal arrangement of the EEG channels, and this works well to interpolate when there is a missing channel in the dataset,<br>
> 5) Next, I re-reference to the average reference<br>
>     EEG = pop_reref(EEG, [ ],'exclude', [65 66]);<br>
>     EEG = eeg_checkset(EEG);<br>
><br>
> While all looks like it was working good, I noted that my unfiltered dataset was drastically changed. For some channels the amplitude of the signal was really diminished and looked like it was flat, but actually was just really diminished.<br>
><br>
> I went to back to my pipeline.<br>
> When I did ICA I set the rank to: all channels minus 3 (-1 due to the average reference and -2 due to both EOG channels)<br>
>     EEG = pop_runica(EEG, 'icatype', 'runica', 'extended', 1,'interupt', 'on','chanind', [1:EEG.nbchan-3]);<br>
><br>
> So, for a given subject the dimensions for the icachansind, icasphere, and icaweights variables were 1x63, 63x63 and 43x63 (so 66 [64 EEG channels + 2 EOG channels] -3). However, for this same subject the number of channels for the unfiltered dataset is 66. I think this is inconsistency is screwing up my data, however I don't know how this should be done to overcome my problem,<br>
><br>
> I find a message in the eeglab list about this but the procedure is not clear to me <a href="https://sccn.ucsd.edu/pipermail/eeglablist/2013/006294.html" rel="noreferrer" target="_blank">https://sccn.ucsd.edu/<wbr>pipermail/eeglablist/2013/<wbr>006294.html</a><br>
><br>
> I hope the description is good enough to show what my problem is,<br>
><br>
> Any directions about this will be really appreciated,<br>
><br>
> Jose<br>
</div></div><div class="HOEnZb"><div class="h5">> ______________________________<wbr>_________________<br>
> Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" rel="noreferrer" target="_blank">http://sccn.ucsd.edu/eeglab/<wbr>eeglabmail.html</a><br>
> To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.<wbr>ucsd.edu</a><br>
> For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.<wbr>edu</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">José Luis ULLOA FULGERI, PhD<br><a href="https://sites.google.com/site/joseluisulloafulgeri/" target="_blank">https://sites.google.com/site/joseluisulloafulgeri/</a><br><span style="border-collapse:separate;color:rgb(102,102,102);font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="font-family:arial;font-size:small"><span style="font-family:tahoma,sans-serif"><span style="border-collapse:separate;color:rgb(102,102,102);font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="font-family:arial;font-size:small"></span></span></span></span></span></div></div><div dir="ltr"><span style="font-size:12.8px">+447516893093</span><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>