Here is the code the mismatch test used in manuiscript Phase-locking of resting-state brain networks with the gastricbasal electrical rhythm, which uses PLV between different days as surrogate data and apply two sample Wilcoxon rank test.
main.R contain codes for getting statistics and generating plots. Notice that data is not attached in this repo, one should prepare and load the Hilbert transformed data, please consult utility.R for help.