<div dir="ltr"><span style="font-size:12.800000190734863px">Hi Tarik and Makoto,</span><br><div><span style="font-size:12.800000190734863px"><br></span></div><div><span style="font-size:12.800000190734863px">Thanks, this is very helpful.  Based on your recommendations I have solved my ICA error.  When I appended a channel and re-referenced to the average reference and add the reference channel back to the data I got the ICA error, but if I add a channel and re-reference to the average reference and add the reference channel back to the data it runs fine.</span></div><div><span style="font-size:12.800000190734863px"><br></span></div><div><span style="font-size:12.800000190734863px">Erika</span><span style="font-size:12.800000190734863px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 8, 2018 at 3:19 PM, Tarik S Bel-Bahar <span dir="ltr"><<a href="mailto:tarikbelbahar@gmail.com" target="_blank">tarikbelbahar@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="color:rgb(51,51,153)">Hi Erica, this looks like it's a bug but not one that usually comes up. It seems that one should be able to select a smaller number of channels to be run. </div><div class="gmail_default" style="color:rgb(51,51,153)">SInce it is repeatable and you haven't found a solution, please log it into the eeglab bugzilla. Some of my thoughts below echo Makoto's.</div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)">It may not be an error, but rather eeglab basically requesting that the channels you put in be the same as the number of channels in the dataset. </div><div class="gmail_default" style="color:rgb(51,51,153)">In the meantime you may want to arrange your data differently to work around this until there is a fix or explanation.</div><div class="gmail_default" style="color:rgb(51,51,153)">Some other quick thoughts below, not sure if they will help, thanks for giving suggestions a try if you have time. </div><div class="gmail_default" style="color:rgb(51,51,153)">Cheers!</div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)">********Extra thoughts for Erika</div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)">If you haven't had a chance, to,  you may want to try    a)delete a channel before ICA to reduce rank after re-referencing </div><div class="gmail_default" style="color:rgb(51,51,153)"> or b) reduce rank by reducing the dimensionality of the ICA by adding a "pca" flag in the function to number of channels minus one.</div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)">You may be able to solve the problem by either 1) delete a single channel right before the ICA step (and running 1:63)</div><div class="gmail_default" style="color:rgb(51,51,153)">or 2) not adding back the reference channel before ICA. Both together may work too.</div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)">What happens when you just don't add in the reference channel? This might be creating the mismatch.</div><div class="gmail_default" style="color:rgb(51,51,153)">I would also step through more closely between the channel count and labels variables in the EEG structure to see if there was a mismatch in eeglab's expectations.</div><div class="gmail_default" style="color:rgb(51,51,153)">See also the sub-structures of EEG that update with reference channel information. </div><div class="gmail_default" style="color:rgb(51,51,153)">Each step should be doable via GUI, and if you are using matlab scripts there should be a checked to make sure commands look like those derived from eegh history of commands run via the eeglab GUI.</div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)">Try triple-checking to make sure you "adding in the reference channel" and "doing average reference" correctly (should all work through the gui)</div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)">Further, it's  important to know is how results look when you run the 1:64 ICA. </div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)">Please see if following sequence works if you get a chance:</div><div class="gmail_default" style="color:rgb(51,51,153)">1. Take the original raw file with channel locations loaded (load 63 channels)</div><div class="gmail_default" style="color:rgb(51,51,153)">2. Remove bad/worst channels and bad/worst periods.</div><div class="gmail_default" style="color:rgb(51,51,153)">3. Interpolate/add the single reference channel (possibly do after ICA or not at all)</div><div class="gmail_default" style="color:rgb(51,51,153)">3. Run ICA on all the remaining good channels (should be at least 45 and well distributed)</div><div class="gmail_default" style="color:rgb(51,51,153)">4. Interpolate bad channels (if computing EEG/ERP metrics at channel level rather than ICA-level. </div><div class="gmail_default" style="color:rgb(51,51,153)">5. Stay in ICA space, and compare/analyze similar ICs across your experiment's design.</div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div>













Erika Nyhus, Ph.D.<br>Department of Psychology and Program in Neuroscience<div>6900 College Station</div><div>Bowdoin College</div><div>Brunswick, ME 04011<br></div><p><span style="font-size:13.0pt"></span></p>

</div></div></div></div>
</div>