== Note: to download all code and files, hit the “Download ZIP” button on the right! == The code in this folder accompanies the paper entitled “Phase-clustering bias in phase-amplitude cross-frequency coupling and its removal”, by Joram van Driel, Roy Cox and Mike X Cohen. This paper is currently submitted for publication to Journal of Neuroscience Methods. The code runs simulations that are discussed in the paper, and produces figures that are included in the paper. Using the code without following the paper may lead to confusion, incorrect data analyses, and misinterpretations of results. The authors assume no responsibility for inappropriate or incorrect use of this code. For correspondence: joramvandriel@gmail.com