Robust Common Average References for EEG
Based on original (unlicensed) code by Kyle Q. Lepage, PhD (webpage) from Boston University. The code (link) implements the mathematics described in the paper:
Lepage, Kyle Q., Mark A. Kramer, and Catherine J. Chu. 2014. “A Statistically Robust EEG Re-Referencing Procedure to Mitigate Reference Effect.” Journal of Neuroscience Methods 235 (September): 101–16.
Available from the author, via pubmed (as a preprint) or in final form from the publisher, if you have the rights.
When this code was originally downloaded from the author's website, it had numerous issues -- it would not run due to function name mis-matches, the parallel processing code was from an older (and for us unavailable) version of MATLAB, etc.
Every attempt has been made to fix the code to make it usable, but neither the original author nor the present author (editor?) can accept any responsibility for anything resulting from the code whatsoever!
All original modules are licensed under the MIT license (see the license file) but the original code was released by Dr. Lepage without any license or requirements. If you use this code implementation, please cite the original author's paper and also this code repository for the actual code you used. Let's make science replicable!