[Eeglablist] Questions about AMICA

Thomas mas thomasmas at gmail.com
Wed Jan 16 06:54:29 PST 2019

Dear all,

I would like to avoid the issues associated with data rank when running
I know that interpolating bad channels and average re-referencing are
common operations that could make the data rank deficient. I also know that
the Matlab 'rank' function is not always reliable.
I am asking whether the following approach is correct.

After interpolating bad channels and re-referencing to the average, I
estimate data rank by using the following snippet of code:

% Estimating data rank
dataRank = EEG.nbchan;
if strcmp(EEG.ref,'averef')
    dataRank = dataRank - 1;
if isfield(EEG.etc,'clean_channel_mask') % using ASR to remove bad channels
    dataRank = dataRank - length(find(~EEG.etc.clean_channel_mask));
dataRank = min([rank(double(EEG.data')) dataRank]);

Next, I enter dataRank in the field named '# PCA Dims' of the
pop_runamica() window. In this way, I get exactly dataRank independent
components, keeping all the channels (remember that this step occurs after
channel interpolation).

Is this approach correct?
Thank you in advance.

All the best,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20190116/592c5534/attachment.html>

More information about the eeglablist mailing list