bioRxiv preprint doi: https://doi.org/10.1101/818906; this version posted October 31, 2019. The copyright holder for this preprint (which was not certified by peer review) is the author/funder. All rights reserved. No reuse allowed without permission.

Non-parametric rank statitics for spectral power and coherence, Nasseroleslami et al. Page 1 of 19

Non-Parametric Rank for Spectral Power and Coherence

Bahman Nasseroleslami*1, Stefan Dukic1, Teresa Buxo1, Amina Coey1, Roisin McMackin1, Muthuraman Muthuraman2, Orla Hardiman1,3,4, Madeleine M. Lowery†5, and Edmund C. Lalor†3,6,7

1Academic Unit of Neurology, Trinity College Dublin, the University of Dublin, Dublin, Ireland. 2Biomedical Statistics and Multimodal Signal Processing Unit, Department of Neurology, University Medical Center of the Johannes Gutenberg-University, Mainz, Germany 3Trinity College Institute of Neuroscience, Trinity College Dublin, the University of Dublin, Dublin, Ireland. 4Beaumont Hospital, Dublin, Ireland 5School of Electrical and Electronic Engineering, University Colelge Dublin, Dublin, Ireland 6Trinity Centre for Bioengineering, Trinity College Dublin, the University of Dublin, Dublin, Ireland. 7Departments of Biomedical engineering and Neuroscience, University of Rochester, Rochester, NY, USA.

June 11, 2018

Abstract Despite advances in multivariate spectral analysis of neural signals, the of measures such as spectral power and coherence in practical and real-life scenarios remains a challenge. The non-normal distribution of the neural signals and presence of artefactual components make it diicult to use the parametric methods for robust estimation of measures or to infer the presence of specific spectral components above the chance level. Furthermore, the bias of the coherence measures and their complex statistical distributions are impediments in robust statistical comparisons between 2 dierent levels of coherence. Non-parametric methods based on the of auto-/cross-spectra have shown promise for robust estimation of spectral power and coherence estimates. However, the statistical inference based on these non-parametric estimates remain to be formulated and tested. In this report a set of methods based on non-parametric rank statistics for 1-sample and 2-sample testing of spectral power and coherence is provided. The proposed methods were demonstrated and tested using simulated neural signals in dierent conditions. The results show that non-parametric methods provide robustness against artefactual components. Moreover, they provide new possibilities for robust 1-sample and 2-sample testing of the complex coherency function, including both the magnitude and phase, where existing methods fall short of functionality. The utility of the methods were further demonstrated by examples on experimental neural data. The proposed approach provides a new framework for non-parametric spectral analysis of digital signals. These methods are especially suited to neuroscience and neural engineering applications, given the attractive properties such as minimal assumption on distributions, statistical robustness, and the diverse testing scenarios aorded.

1 Introduction herence between two (or multiple) signals (Brillinger, 2001) is pivotal to the analysis of neural signals. The spectral analyses of neuro-electric signals such The analysis of , in- as electroencephalographic (EEG) and electromyo- cluding the analysis of spectral power and the co- graphic (EMG) signals have been specifically of inter- est (Rosenberg, Halliday, Breeze, & Conway, 1998; D. * Correspondence: Room 5.43, Trinity Biomedical Sciences In- stitute, 152-160 Pearse Street, Dublin D02 R590, Ireland. E-Mail: Halliday et al., 1995; D. M. Halliday & Rosenberg, 1999), [email protected] as they reflect the intensity of neural oscillations in † Joint Last Author. bioRxiv preprint doi: https://doi.org/10.1101/818906; this version posted October 31, 2019. The copyright holder for this preprint (which was not certified by peer review) is the author/funder. All rights reserved. No reuse allowed without permission.

Non-parametric rank statitics for spectral power and coherence, Nasseroleslami et al. Page 2 of 19

the nervous system, as well as the short and long components above the chance level (1-sample testing) communications in the neural circuits through or presence of a significant dierences between condi- the oscillation synchrony or coherence(Siegel, Don- tions or sets of signals (2-sample testing). ner, & Engel, 2012). The discovery and quantifica- We have recently shown that using the median tion of fundamental neurophysiological phenomena rather than for estimating the auto-spectra, such as cortico-cortical coherence (Walter, 1963; Koles cross-spectrum, and coherence can attenuate the ef- & Flor-Henry, 1987), intermuscular coherence (Person fect of artefactual components in EEG connectivity & Kudina, 1968; Farmer, Bremner, Halliday, Rosen- analysis (Dukic et al., 2017). However, the analysis of berg, & Stephens, 1993) and cortico-muscular coher- the statistical significance of non-parametric spectra ence (Conway et al., 1995; D. Halliday et al., 1995) and and coherence measures can no longer be assessed subsequent contributions to the study of motor sys- using the traditional estimates for the expected val- tem neurophysiology (Boonstra, 2013; Wijk, M, Beek, & ues of spectra that rely on the mean operator (Rosen- Daertshofer, 2012) and pathophysiology (K. M. Fisher, berg et al., 1998; D. Halliday et al., 1995; D. M. Halliday Zaaimi, Williams, Baker, & Baker, 2012; Nasseroleslami & Rosenberg, 1999). Non-parametric rank statistics et al., 2017) have been underpinned by spectral power (e.g. Sign Tests, Wilcoxon’s Signe dRank Test, Mann- and coherence analysis of the neuroelectric signals. Whitney U Test, and Kruskal-Wallis Analysis of Vari- ance) have provided promising approaches to statisti- Despite advances in the application of spectral cal inference (Akritas, Lahiri, & Politis, 2014; Puri & Sen, power and coherence analysis of neural signals in (mo- 1971). However, these methods have not been trans- tor) neuroscience (Nasseroleslami, Lakany, & Conway, lated to spectral signal analysis. In this report a new 2014; Waldert et al., 2009), neural and rehabilitation non-parametric approach for estimating the spectral engineering (Aleksandra Vuckovic et al., 2014; Xu et al., power and coherence measures is explained and new 2014; A. Vuckovic et al., 2015) and neuro-diagnostics methods based on non-parametric rank statistics are (Iyer et al., 2015; Nasseroleslami et al., 2017), the statis- developed in order to assess the significance of the tical inference of these measures in practical and real- power and coherence, as well the dierences between life scenarios remains a challenge. The high dimen- the levels of two power or coherence measures. We sional nature of EEG and EMG signals that span a few will demonstrate and test the utility of these measures to hundreds of (spatial) channels, dierent frequency- through simulated signals and provide an example on bands and dierent time windows is a challenge that the application of these measures in the context of re- can be addressed by using contracted/abstract mea- search on neuro-electric signals. sures (e.g. band-specific averages, number of de- tections and maximum/peak value and locations), or more systematically by false discovery rate corrections (Benjamini & Hochberg, 1995; Benjamini, Krieger, & Yekutieli, 2006) and empirical 2 Original Formulation for Spec- (Efron, Tibshirani, Storey, & Tusher, 2001; Efron, 2004, tra and Coherence 2007). There are, however, more fundamental chal- lenges in statistical inference of spectral measures of x(t) y(t) neuro-electric signals. First, the statistical distribu- Consider and to be signals (with t x (t) y (t) tion of the neural signals can deviate from normal representing time), and i , i representing one L distribution, due to the complex underlying neuro- of the epochs of the signals. The frequency domain physiological phenomena (Nasseroleslami et al., 2014; representation of the signal, i.e. the (Discrete) Fourier Mehrkanoon, Breakspear, & Boonstra, 2014), non- Transform of each epoch is then represented by the X (f) Y (f) f stationarity (A. Anwar et al., 2014; van Ede, Quinn, complex-valued i and i ( is the frequency). F F Woolrich, & Nobre, 2018), and other potentially un- The auto-spectral densities xx and yy, as well as the F known factors. Moreover, presence of various arte- cross-spectral density xy are defined as (Bloomfield, factual components (Tatum, Dworetzky, & Schomer, 2004; Brillinger, 2001): 2011) lead to extreme outliers (Nolan, Whelan, & Reilly, 2010) that lead to non-normal distributions and dra- matical bias of the parametric measures of central- F (f) = E{X (f)X (f)∗} (1) ity. Artefact rejection methods (Mohr, Nasseroleslami, xx i i ∗ Iyer, Hardiman, & Lalor, 2017; Nolan et al., 2010) can re- Fyy(f) = E{Yi(f)Yi(f) } (2) ∗ duce some (but not all) of these unwanted eects due Fxy(f) = E{Xi(f)Yi(f) } (3) to artefacts, but not those originating from the under- lying neurophysiological complexity and the inherent non-stationarity or non-linearities. These issues are where ∗ denotes the complex conjugate and E{.} major obstacles against using the existing paramet- denotes the , which is typically taken as ric methods (Brillinger, 2001; Bloomfield, 2004; Priest- the of the values across the L epochs, ley, 1982) for inferring the presence of specific spectral i.e. bioRxiv preprint doi: https://doi.org/10.1101/818906; this version posted October 31, 2019. The copyright holder for this preprint (which was not certified by peer review) is the author/funder. All rights reserved. No reuse allowed without permission.

Non-parametric rank statitics for spectral power and coherence, Nasseroleslami et al. Page 3 of 19

L 1 X F¯ (f) = X (f)X (f)∗ (4) xx L i i i=1 L 1 X F¯ (f) = Y (f)Y (f)∗ (5) yy L i i i=1 L 1 X F¯ (f) = X (f)Y (f)∗ (6) xy L i i i=1 The bar symbol (¯) here indicates that the expected value was found using the mean operator. The of auto-spectra can at frequency f be approximated using the 2 var{Fxx(f)} ≈ (Fxx(f)) /L. In practice, the more useful relationship is that of the signal’s asymptotic variance. Therefore, loge(Fxx(f)) will have the stan- Figure 1. Statistical Distribution of the Time- − 1 Domain Signals, the Raw Auto-Spectra and The dard deviation of ±L 2 (Bloomfield, 2004; D. Halli- Estimation of Auto-Spectra using the Mean (F¯) day et al., 1995). This standard deviation (or variance) and Median (F˜). The simulated data are 2000 value can be used to identify statistically significant epochs of 1-s long random normal data (white oscillations. Specific spectral components are signif- noise) at 1000Hz for x(t). y(t) was taken as linear icantly dierent from this signal value as tested by a combination of similar random data with weight 0.2 and signal x with the weight 0.8.ejπ/4. The 1-sample t-test (or a z-test). The log-transformed para- data used in were taken from 10th time metric are, however, may not be stable and points and frequency values at 10Hz.. suitable for 2-sample testing of the levels of spectral power in 2 dierent conditions. The spectral coherency function is defined as a 2-sample testing of 2 dierent coherence values, pos- function of the auto-spectra and cross-spectrum, and sibly with the ability to detect changes in both ampli- therefore given by: tude and phase is not adequately established.

Fxy(f) 3 Non-Parametric Estimation of Cxy(f) = p (7) Fxx(f)Fyy(f) Spectra and Coherence The coherence, defined as |C (f)|2 is a commonly xy We have recently demonstrated (Dukic et al., 2017) used measure to assess the frequency domain cor- that in order to reduce the eects of artefactual com- relation or phase synchrony between x(t) and y(t). ponents and account for non-normal distribution of It can be rewritten and interpreted as a measure of signals, we may choose to use the Median operator as phase synchrony across epochs that is weighted by an estimator for the auto- and cross-spectra: the magnitude values (Cohen, 2014). Statistical analy- sis of coherence is complicated in the general form, as ∗ it has a hyper-geometric distribution (Priestley, 1982). F˜xx(f) = Mediani[{Xi(f)Xi(f) }] (9) However, for the null hypothesis (where the coher- F˜ (f) = Median [{Y (f)Y (f)∗}] (10) ence is 0), the distribution can be very accurately ap- yy i i i ˜ ∗ proximated. In this case a tanh−1(.) transforms the Fxy(f) = Mediani[{Xi(f)Yi(f) }] (11) null coherence distribution to normal (Brillinger, 2001; The tilde symbol (˜) here indicates that the expected Bloomfield, 2004; D. Halliday et al., 1995). Therefore value was found using the median operator. for a given significance level α, the one-tail threshold Figure 1 shows the statistical distribution of 2 ex- value for significant coherence would correspond to emplary raw auto-spectra, as well as the auto-spectra 1 − α1/(L−1), or: values estimated using the traditional mean opera- tor, F¯xx(f) or the new median operator, F˜xx(f). As 2 (L−1) the autospectra F (f) and F (f) are real-valued p = (1 − |Cxy(f)| ) (8) xx yy 1D variables, the definition on median, as the value Equation (8) can be used for hypothesis testing of the inverse cumulative distribution function at 0.5, against a significance threshold α such as 0.05 or iCDF(0.5), is straightforward. 0.001. This estimate is very accurate under the nor- Figure 2 shows the statistical distribution of an ex- mal distribution assumption of the time domain sig- emplary raw cross-spectra. The 2D distribution of nals, and is a powerful statistical test. However, the the complex-valued raw cross-spectra, as well as the bioRxiv preprint doi: https://doi.org/10.1101/818906; this version posted October 31, 2019. The copyright holder for this preprint (which was not certified by peer review) is the author/funder. All rights reserved. No reuse allowed without permission.

Non-parametric rank statitics for spectral power and coherence, Nasseroleslami et al. Page 4 of 19

marginal distributions (projected to the real and imag- of the distributions using the inverse cumulative dis- inary axes, respectively) are shown. The 2D cross- tribution functions, iCDF. For example, the 2-tail 95% spectrum values estimated using the traditional mean with α = 0.05 would be: operator, F¯xy(f) or the new median operator, F˜xy(f) are shown on the 2D and marginal distributions.

The definition of the 2D median can be based 2 2 [iCDF{|Xi(f)| }(α/2), iCDF{|Xi(f)| }(1 − (α/2))] on several (slightly) dierent criteria (Pranab K. Sen, (15) 2005; Niinimaa & Oja, 2006). The simplest estimate of 2D median is the marginal median, whose compo- which is defined non-parametrically on the signal nents are calculated as 1D median in each dimension values at the desired frequency or band f. In case the of the multivariate data (Niinimaa & Oja, 2006). There- distribution (commonly needed for statisti- fore, the complex (marginal) median is found by com- cal testing) of the measures F¯xx(f) or F˜xx(f) are re- bining the median of the real and the median of the quired, they can be found by bootstrapping; however, imaginary values (Dukic et al., 2017): this is not primarily of interest, as the statistics will be handled using non-parametric rank-based methods.

∗ F˜xy(f) = Mediani[{real(Xi(f)Yi(f) )}] (12) ∗ 4.1 1-Sample Power: Testing for Signifi- +j.Mediani[{imag(Xi(f)Yi(f) )}] cant Spectral Activity The other approach is to use the Spatial Median, A hypothesis that is more commonly needed to be which is based on the minimum Euclidean distance tested is the presence of a neural oscillations (spec- from data points (Niinimaa & Oja, 2006). tral power) at a specific frequency (band), beyond that of other frequencies in the null situation (e.g. a white noise). The above-mentioned confidence inter- L vals may prove useful. However, in practical applica- ˜ X ∗ Fxy(f) = arg min( kXi(f)Yi(f) − Θk) (13) tions such as in neural signal analysis it is usually de- Θ i=1 sired to establish the significant presence of activity in specific frequencies with respect to the others. The fol- This is a more favourable choice, given its more use- lowing procedure explains a method for such a statis- ful properties in 1-sample and 2-sample tests. tical testing. Following the calculation of the non-parametric If |X (f )|2 shows the power pertaining to the auto-spectra and cross-spectrum, the coherence may i j epoch i (of total L), and the frequency value or fre- be estimated similar to the parametric case: quency band j (of total M selected frequency bands for analysis, excluding 0 or DC values), we may find for ˜ each epoch i, the tie-adjusted rank Rxx,i(fj) among ˜ Fxy(f) Cxy(f) = q (14) the M values which will give values in the range F˜xx(f)F˜yy(f) [1, M − 1]. We can then use the centred version of the rank Rxx,i(fj) − (M/2), and consequently ap- This non-parametric coherency, usually described ply a non-parametric test such as Wilcoxon’s Signed in terms of the magnitude |C˜xy|, can be interpreted Rank test on the L centred rank values Rxx,i(fj) − similar to the parametric definition |C¯xy|. However, (M/2), i = 1...L which tests for higher or lower fre- both measures are biased and the values that corre- quency content at the tested frequency fj. This pro- spond to specific significance levels depend on the cedure detects a significant presence (or absence) of number of epochs L used for calculation, as well as spectral or oscillatory activity under the null assump- other potential spectral smoothing procedure. There- tion of the white noise distribution. The test can be fore, to account for these concerns and to elevate the modified for testing against dierent null hypotheses numerical instability of |C˜xy| found by small number (e.g. a noise with 1/f distribution), by subtracting the 2 of epochs L, the spectral power and coherence mea- profile of the null auto-spectrum from the {|Xi(fj)| } sures are best described in terms of their p-values. data before forming the rank values. Figure 3 provides This will be established in the following section. a pictorial explanation of this testing procedure for de- tecting a sinusoidal component mixed with a white noise. It shows a median-based estimate of auto- ˜ 4 Non-parametric Rank Statistics spectrum Fxx(f), as well as the p-value of the spec- trum associated with the oscillatory activities in the for Spectral Power signal. Notice that if the intention is to detect only the in- The statistical distribution of the raw auto-spectra crease (or decrease) in spectral components a right- 2 {|Xi(f)| } can be used to define specific tail or le-tail test may be used. bioRxiv preprint doi: https://doi.org/10.1101/818906; this version posted October 31, 2019. The copyright holder for this preprint (which was not certified by peer review) is the author/funder. All rights reserved. No reuse allowed without permission.

Non-parametric rank statitics for spectral power and coherence, Nasseroleslami et al. Page 5 of 19

Figure 2. Statistical Distribution of the Raw Cross-Spectra in 2D and Marginal Plots and the Estimation of Cross- Spectrum using the Mean (F¯xy) and Median (F˜ xy). The 2D plots (top) show the functions as a function of the real and imaginary components and the 1D plots (bottom) show the marginal distribution of the real and imaginary components in the presence of a non-zero coherence. The frequency values correspond to the 10Hz of the x and y signal as in Figure 1.

4.2 2-Sample Power: Testing for Signif- herence is a 1-sample 2D location problem where the icant Change of Power of Between cross-spectrum is compared against 0 + j0. The test Groups for comparing the coherence between 2 pairs of pos- sibly coherent signals is a 2-sample 2D location prob- Testing for between-group comparisons is straight- lem. Each of these scenarios will be discussed as fol- 2 2 forward as the data {|Xi(f)| } and {|Yi(f)| } can be lows. directly tested with Mann-Whitney U test. As the non- parametric two-sample location test can be applied on 1D data with non-normal distributions, the power val- 5.1 1-sample Coherence: Testing for Sig- ues in individual epochs can be directly compared. No- nificant Coherence tice that the number of epochs for this comparison can ∗ be dissimilar. The L complex values {Xi(f)Yi(f) } in the 2- Dimensional complex plane need to be compared to the point (0, 0). This is a 2-dimensional 1-sample lo- 5 Non-parametric Rank Statistics cation problem (Figure 4). A parametri version of such a test is the 1-sample Hotelling’s T 2 test (Hotelling, for Coherence 1931). However, in addition to the parametric nature of the test, the 2D distribution of cross-spectrum data The cross-spectrum F˜xy or the coherence C˜xy = q is not normal and is not straightforward to convert to ˜ ˜ ˜ Fxy/ FxxFyy defined based on the of the normal by either functional (e.g. log(.)) (Box & Cox, auto- and cross-spectra can be tested against the null 1964) or inverse normal transformations (Beasley, hypothesis. The test for presence of significant co- Erickson, & Allison, 2009). Therefore, in order to bioRxiv preprint doi: https://doi.org/10.1101/818906; this version posted October 31, 2019. The copyright holder for this preprint (which was not certified by peer review) is the author/funder. All rights reserved. No reuse allowed without permission.

Non-parametric rank statitics for spectral power and coherence, Nasseroleslami et al. Page 6 of 19

Figure 4. Non-Parametric 1-Sample Testing for Significant Coherence.. The dots show the complex-values raw cross-spectra data points and the colour shows the 2D probability density func- tion for the same data. The raw cross-spectra (i.e. the median-based estimate of coherence C˜xy) are compared against the zero, i.e. the origin (0, 0). This corresponds to testing for the dierence be- tween the coherence magnitude |C˜xy| (or ∆ = |C˜xy| − 0) against zero. Notice that as the the di- q vision by F˜xxF˜yy is only a scaler scaling factor in the definition of coherence in Equation (14), the comparison against zero for cross-spectrum and coherence are equivalent. The simulated data are Figure 3. Finding the Significance of Oscilla- similar to the description in Figure 1, taken at 10Hz tory Power by Rank Statistics. Top: Rank or- . dering is first applied across frequencies at each epoch. The centred ranks are subsequently tested at each frequency using Wilcoxon’s Signed Rank Team, 2016), the R-package MNM (Nordhausen & test. Middle: Median-based estimate of auto- Oja, 2011; Nordhausen, Mottonen, & Oja, 2018), this spectrum log10(1 + F˜xx) and the of the raw auto-spectra Bottom: p-value of test has been implemented as "mv.1sample.test", a the spectral power against the null hypothesis of signed-rank based test with inner standardization. no significant presence of specific oscillatory com- Notice that this 1-sample test in fact corresponds to ponents (white noise). The data for simulation was the presence of significant magnitude. A separate taken as 10 epochs of 40 sampled at 40Hz, a lin- ear combination of white noise with the weight of non-parametric test to compare the phase of the 1 and a sinusoidal waveform at 5Hz with the weight coherence against a hypothesised value φ0 can be of 0.85. . achieved by applying the Wilcoxon’s Signed Rank test ∗ on the data {∠(Xi(f)Yi(f) ) − φ0} (represented in the range [−π, π]). ∗ follow the non-parametric route, {Xi(f)Yi(f) } can be tested against zero using non-parametric 2-dimensional sign or rank statistics. The statistical 5.2 2-Sample Coherence: Testing for Sig- tests based on marginal medians (Pranab Kumar Sen nificant Dierence of Coherence Be- & Puri, 1967; Puri & Sen, 1971) are simple to use. tween Groups However, they are not aine-invariant; therefore, in the context of spectral analyses they would produce In 2-sample problems, it may be desired to compare variable results for the same level of coherence but the coherence between the 2 signals x(t) and y(t) in with dierent phase dierences (corresponding to an experimental condition 1 with L1 epochs against a rotation transformation in the complex plane). their coherence in experimental condition 2 with L2 Therefore, only aine-invariant tests are suitable for (or to compare the synchrony of 2 dierent pairs of sig- this 2D location problem. An example of these tests nals). The existing methods for comparing 2 levels of are the tests based on spatial median and spatial coherence values in 2 groups has limitations. One lim- (signed) ranks (Hannu Oja & Randles, 2004; Hannu itation is the inability to simultaneously test for a dif- Oja, 2010; Nordhausen & Oja, 2011). In R (R Core ference in magnitude and phase of coherence, with no bioRxiv preprint doi: https://doi.org/10.1101/818906; this version posted October 31, 2019. The copyright holder for this preprint (which was not certified by peer review) is the author/funder. All rights reserved. No reuse allowed without permission.

Non-parametric rank statitics for spectral power and coherence, Nasseroleslami et al. Page 7 of 19

solid method to test for phase dierence. Importantly, dierence Z-score is significance tested according√ to comparisons at individual subject levels are not estab- the resultant variance of the 2 z distributions, i.e 2. lished. In other words:

5.2.1 Comparison of Phase z1 = iCDFN (0,1)(p1) (16) z = iCDF (p ) (17) The comparison of phase between the spectral data 2 N (0,1) 2 ∗ ˜ z2 − z1 {Xi(f)Yi(f) |i = 1...L1} (with coherence C1(f)) Pdiff,L = CDFN (0,1)( √ ) (18) ∗ and {Xk(f)Yk(f) |k = 1...L2} (with coherence 2 C˜2(f)) can be achieved using the circular statisti- Pdiff,R = 1 − Pdiff,L (19) cal tests. The parametric and non-parametric cir- Pdiff = 2.min(Pdiff,L,Pdiff,R) (20) ∗ cular tests for comparing {∠(Xi(f)Yi(f) )} and ∗ where N (0, 1) denotes the normal distribution with {∠(Xk(f)Yk(f) )} would be the Watson-Williams (Watson & Williams, 1956) and Fisher’s (N. I. Fisher, mean 0 and standard deviation 1; (i)CDF stands for (in- 1995) tests. Such tests provide valid results only un- verse) cumulative distribution function. The Pdiff,L der certain assumption (e.g. on the presence of a min- and Pdiff,R are the le- and right-tail dierence p- imum circular clustering in data), therefore they may values and Pdiff the two tail p-value of dierence be- not provide reliable estimates and a uniform p-value tween the 2 coherence levels. This procedure is similar distribution under the null condition. An alternative to the Stouer’s method (Stouer, 1977; Westfall, 2014) simple approach is to find the circular mean of the for combining 2 or more p-values, except that the two data in both samples and then find the (minimum) cir- z-scores are subtracted (rather than summed). cular distance of the data in each group to this com- mon circular mean. The distances are consequently 5.2.3 Simultaneous Comparison of Magnitude compared using the 2 sample t-test (as the paramet- and Phase ric case) with unequal variances assumption. Given that the circular data are not actually normally dis- Using an approach similar to the 1-sample problem tributed (nor necessarily have a Von-Mises-like circular (See section 5.1), we may use 2-dimensional 2-sample distribution), the non-parametric option to compare location problems by considering the spectral data {X (f)Y (f)∗} {X (f)Y (f)∗} the phase values would be to apply the Mann-Whitney i i and k k as data points in U test on the previously found distances in each group. the 2-dimensional real-complex plane (Figure 5). The dierence can be tested parametrically using the 2- However, importantly, the results of such tests for sample Hotelling’s T 2 test. This test, however, may 1D phase comparisons are limited, as the they are not not be preferred, given the sensitivity of test to the nu- weighted by the magnitude of the raw cross-spectra merically calculated covariance matrices, which will and their validity is conceptually questioned when one be accentuated by the non-normal distribution of data or both of the coherence values are very low and non- and presence of artefacts. Similar to the 1-sample significant. case, the 2-dimensional non-parametric tests can be used for this comparison. A simple and computa- 5.2.2 Comparison of Magnitude tionally eicient test is the Jure˘cková-Kalina (JK) test (Jurečková & Kalina, 2012) or two-sample tests for The comparison of the magnitude of coherence marginal medians (Puri & Sen, 1971). However, in or- ∗ between the spectral data {Xi(f)Yi(f) } and der to achieve aine invariance property (as for the 1- ∗ {Xk(f)Yk(f) } is not straight-forward, due to the sample case), tests based on spatial median and spa- eects of phase in shaping the resultant coherence tial ranks (Hannu Oja & Randles, 2004; Hannu Oja, magnitudes. Consequently, only the resultant co- 2010; Nordhausen & Oja, 2011) are preferred. The MMN ˜ ˜ herence values C1(f) and C2(f) are available for R-package (Nordhausen & Oja, 2011; Nordhausen et al., testing, but not the accompanying standard devia- 2018), has implemented this test as "mv.Csample.test", tions or individual data points. Nevertheless, under a rank based test with inner standardization. Notice the assumption of equality of the phases between that this 2-/multi-sample test can in fact quantify the two coherent conditions (or its lack of importance), location dierence between the 2 coherence levels, a statistical trick may be used for a quick test of which may originate from dierences in the magni- dierence between the strength of coherences. First tude, phase or both. both coherence values are compared against the null condition, i.e. two 1-sample tests are performed sepa- rately in each group and the resulting p-values p1 and 6 Numerical Examples p2 are found by either a parametric or non-parmetric test as described by Equation (8) or in Section 5.1. The Several demonstrative examples are provided using p-values are then transformed to z-scores z1 and z2 by both simulated data, as well as real-life examples us- iCDFN (0,1)(.), subtracted from each other and then ing experimental EEG and EMG data. bioRxiv preprint doi: https://doi.org/10.1101/818906; this version posted October 31, 2019. The copyright holder for this preprint (which was not certified by peer review) is the author/funder. All rights reserved. No reuse allowed without permission.

Non-parametric rank statitics for spectral power and coherence, Nasseroleslami et al. Page 8 of 19

parametric tests. Each condition was simulated sev- eral times to aord stable estimates of the average val- ues for −log10(p).

6.1.1 1-Sample Spectral Power

Figure 6(top) shows the simulation results of a sinu- soidal waveform (signal), mixed with a background white noise (noise). As the Signal-Ratio r, defined by the percentage of the amplitudes, increases from 0 to higher values, the detection of significant oscil- latory component, quantified by the p-values of the parametric and non-parametric tests are shown. The −log10(p) increases as function of r for both the para- metric and non-parametric tests. While the parametric test is more sensitive at higher r values, it is dramat- ically aected by artefacts. The non-parametric test showed a reasonable level of robustness against arte- facts.

Figure 5. Non-Parametric 2-Sample Testing for Significant Dierence between 2 Coherence Val- 6.1.2 2-Sample Spectral Power ues. The dots show the complex-valued raw nor- malised cross-spectra data points for 2 pairs of sig- Figure 6(bottom) shows the simulation results of 2 si- nals (x1, y1) (red) and (x2, y2) (blue). The dier- nusoidal waveform (signals), mixed with background ence of distant between the raw normalised cross- white noise (noise). As the eect size d, defined by the spectra (i.e. the median-based estimates of co- dierence of the two signal ratios r = 0.3 and r , in- herence values C˜x1y1 and C˜x2y2) is compared 1 2 against the zero. This corresponds to testing for creases from 0 to higher values, the detection of sig- the magnitude of dierence between the coher- nificant dierences in spectral power are shown. The ˜ ˜ ence values ∆ = |Cx2y2 − Cx1y1|) against zero. −log (p) increases as function of d for both the para- The simulated data are similar to the description in 10 Figure 1, taken at 10Hz. x1 and x2 are constructed metric and non-parametric tests. The parametric and as white noise signals including 2000 epochs of 1s non-parametric tests result in very similar p-values as at 1000Hz. y1 in built by a linear combination of a function of the decrease and increase in the eect jπ/4 white noise noise and x1 with a factor 0.8.e . size. However, the non-parametric tests aord a con- y2 in built by a linear combination of white noise −jπ/8 noise and x2 with a factor 0.7.e . siderably higher level of robustness against artefacts.

6.1.3 1-Sample Coherence 6.1 Simulated Data Figure 7 shows the simulation results of 2 signals with Before generating the demonstrating examples below, r-percent shared synchronous sinusoidal oscillations. the sanity of all of the tests were verified by ensuring As r increases from 0 to 0.5, the detection of significant that under the null condition the probability density coherence is shown. The −log10(p) increases as func- function of the p-values are uniform. tion of r for both the parametric and non-parametric In all the simulations, epochs of normally dis- tests. While the non-parametric test is more sensitive tributed random numbers (white noise) were consid- at higher r values, it is dramatically aected by arte- ered as x(t) and y(t) signals. The presence of coher- facts. The non-parametric test showed a reasonable ence was simulated by adding a sinusoidal waveform level of robustness against artefacts. to the data in all the epochs, which constituted a ra- tio r of the combined total signal. A second condition 6.1.4 2-Sample Coherence for non-normal distributions was considered, where contamination by artefactual components yield non- To inspect the eicient detection of dierences in 2 normal distributions (referred to here as the condi- coherence levels, including both the magnitude and tion with artefacts). This latter condition was emu- phase, 2 series of simulations were carried out using lated by adding large white noises with non-zero base- 2D tests. Each set of simulations assessed the eect of lines to 10% of the epochs. The p-values, expressed dierences in either magnitude or the phase of coher- as −log10(p) were compared across the normal sig- ence. In addition to comparisons between the para- nal condition and the non-normal contaminated sig- metric and non-parametric tests on normal and con- nal, when tested by both the commonly-used para- taminated data, the 1D tests for comparing the magni- metric tests, as well as the newly proposed use of non- tude or phase are provided as a reference. bioRxiv preprint doi: https://doi.org/10.1101/818906; this version posted October 31, 2019. The copyright holder for this preprint (which was not certified by peer review) is the author/funder. All rights reserved. No reuse allowed without permission.

Non-parametric rank statitics for spectral power and coherence, Nasseroleslami et al. Page 9 of 19

Figure 7. Simulation: The Non-Parametric 1- Sample Statistical Test, Spatial Signed Rank, for Presence of Significant Coherence is Robust Against Artefacts. The simulated data for x1 in- Figure 6. Simulation: Non-Parametric Statisti- clude 50 epochs of random standard normal data cal Tests of Spectral Power are Robust Against (white noise) with 1s duration at 40Hz. y1 in built Artefacts in Simulations of 1-Sample and 2- by a linear combination of white noise and x1 Sample Comparisons. The simulated data in- with a factor r.ejφ. Artefactual components were clude 50 epochs of random standard normal data added to 10% of epochs (randomly chosen) which (white noise) with 1s duration at 40Hz, combined were a combination of random white noise with linearly with a sinusoidal waveform at 10Hz with standard deviations of 2, and a random shi be- the relative signal weight r. For 1-sample test tween -2 and +2. All the tests were repeated 10 (top) the presence of the oscillatory component times and the average values are shown. The tests was detected in the signal combined with noise were performed on the values that correspond to at dierent values of signal ratio r. For 2-sample 10Hz. The results shown correspond to phase dif- tests (bottom), dierent levels of eect size d were ference φ = 0; the simulations with other phase tested by choosing r1 = 0.3 for x1 and vary- dierence values yielded the same results. See ing r2 values for x2, so that d = r2 − r1 = section 5.1 for details on the on-parametric Spatial r2 − 0.3. Artefactual components were added Signed Rank Test and equation (8) for the descrip- to 10% of epochs (randomly chosen) which were tion of the parametric test. a combination of random white noise with stan- dard deviations of 10, and a random shi be- tween -5 and +5. All the tests were repeated 100 times and the average values are shown. The tests were performed on the values that correspond to 10Hz. See section 4.1 and Figure 3 for the de- tails of 1-Sample non-parametric tests. For the 2- sample non-parametric tests, Mann-Whitney’s U test was used. For parametric tests, the z-scores, 1- sample and 2-sample t-tests replaced the centred ranks, Wilcoxon’s Signed Rank, and Mann-Whitney U tests, respectively. bioRxiv preprint doi: https://doi.org/10.1101/818906; this version posted October 31, 2019. The copyright holder for this preprint (which was not certified by peer review) is the author/funder. All rights reserved. No reuse allowed without permission.

Non-parametric rank statitics for spectral power and coherence, Nasseroleslami et al. Page 10 of 19

Magnitude Dierence. Figure8 shows the simula- 6.2.1 Spectral Power tion results of 2 pairs of signals with correlation val- ues of r and 0.5 and the same phase values of coher- Figure 10 shows the distribution of the raw auto- ence. As the dierence between the correlation val- spectra for an EEG signal at dierent confidence in- ues changes from -0.3 to 0.3, the detection of signif- tervals, the autospectrum calculated using the mean icant dierence between coherence levels is shown. operator, as well as the auto-spectrum calculated us- ing the median operator. Notice that even aer the The −log10(p) increases as function of dierence for both the parametric and non-parametric tests. While log-transform the spectrum has a non-normal distri- the 2D parametric test is more sensitive than the 2D bution, as evidenced by the dierence between the non-parametric test at higher r values, it is dramat- mean and median, as well as the poor prediction of the ically aected by artefacts. The 2D non-parametric 68% CI by ±σ range. The p-values have similar overal test showed a reasonable level of robustness against behaviour, given that EEG signal is being tested against artefacts. Similarly, the 1D parametric test is more white noise as the null hypothesis. The parametric test sensitive than the 1D non-parametric test (and even is more eective and powerful at lower dominant fre- the 2D parmetric test) at higher r values. It is, how- quencies, whereas the −log10(p) for non-parametric ever, considerably aected by artefacts. The 1D non- test is limited by the finite sample size and is saturated. parametric test showed a reasonable level of robust- On the other hand, non-parametric test performs bet- ness against artefacts, but does not show a major ter at frequencies about 400Hz, where the physiologi- advantage over the 2D non-parametric test except at cal content of the biosignals degrade, recording equip- lower coherence/dierence values. ment filters part of the signal components, and the sig- nal to noise ratio is very low. Figure 11 compared the spectral EEG power between Phase Dierence. Figure 9 shows the simulation re- the 2 electrodes C3 and C4 above the contralateral sults of 2 pairs of signals with similar correlation val- and ipsilateral motor cortices of the active ongoing ues of 0.5, but with coherence phase values chang- motor task. Both the parametric and non-parametric ing systematically between [0, π]. As the dierence be- tests based on the raw distribution of auto-spectra tween the phase values changes from 0 to π, the detec- prove useful in detecting low-alpha, low and high beta tion of significant dierence between coherence val- and low gamma changes of spectral power. The mi- ues is shown. The −log10(p) increases as function of nor dierence between the non-parametric and para- dierence for both the parametric and non-parametric metric tests (including stronger detections by the non- tests. While the 2D parametric test is more sensitive parametric test) can be due to minor dierence in sta- than the 2D non-parametric test at higher r values, tionarity and the components from multiple physio- it is dramatically aected by artefacts. The 2D non- logical processes. parametric test showed a reasonable level of robust- ness against artefacts. Both the parametric and non- parametric 1-D tests for phase dierences, performed 6.2.2 Coherence poorly against the 2D tests. Figure 12 shows the p-values corresponding to the traditional 1D statistical analysis of coherence using 6.2 Experimental Data Equation (8), as well as the new 2D non-parametric test (Spatial Signed Rank). Both tests provide very The statistical tests described above were applied comparable results. The non-parametric test pro- on real-life experimental data to further demonstrate vides stronger detection of synchronies in the beta and their utility in practice. The experimental task was a gamma band. The non-parametric detection of alpha sustained isometric pincher grip at 10% Maximum Vol- band coherence is weaker. This can be due to the large untary Contraction (MVC) level. This was performed in transient alpha oscillations that are not dominant in 30 trials each lasting 5s. Experimental EEG and EMG the full distribution. The absolute value or the mag- data, including the Ear-Lobe-Referenced (ELR) EEG at nitude of coherence are both comparable with mean electrodes C3 and C4, as well as bipolar EMG recorded and median estimates. However, as the relationship from First Dorsal Interosseous (FDI) muscle were col- between the coherence and p value is mediated by the lected during the motor task. EEG and EMG signals number of epochs, there is always a bias term. This were recorded at 2048Hz, filtered between 0 (DC) and relationship is known for the parametric case, Equa- 410Hz and stored for analysis. Data from a healthy tion (8), but is not available for the non-parametric control subject (age=?, gender=?) was used for analy- case. The p-value spectrum therefore provides the sis. A total of 102 epochs each lasting 1s that were cor- same function and resolves these issues. The phase rectly recorded were checked for artefacts (Dukic et al., values corresponding to significant coherences show 2017) and 99 acceptable epochs were used for analy- a range of non-trivial values using both the mean and sis. Given the rejection of extreme artefacts, it is ex- median-based estimation, including a specific posi- pected that both parametric and non-parametric pro- tive slope in alpha band and zero slop at high beta vide comparable results. band. bioRxiv preprint doi: https://doi.org/10.1101/818906; this version posted October 31, 2019. The copyright holder for this preprint (which was not certified by peer review) is the author/funder. All rights reserved. No reuse allowed without permission.

Non-parametric rank statitics for spectral power and coherence, Nasseroleslami et al. Page 11 of 19

Figure 8. Simulation: The Non-Parametric 2-Sample Statistical Tests based on Spatial Rank and Spatial Signed Rank for Comparison of the Coherence Magnitude between 2 Conditions are Robust Against Artefacts. The 1D tests of dierence use the statistical trick in section 5.2.2 for finding the dierence based on 2 p-values (calculated parametri- cally from equation (8) or non-parametrically from 1-sample Spatial Signed Rank test in section 5.1). The 2D tests are 2- sample Hotelling’s T 2 (parametric) and the 2-sample Spatial Rank test (non-parametric). Notice that the non-parametric tests are always more robust than parametric tests, where the 2D 2-sample test performs better at higher coherence val- ues/dierences and the 1D statistical trick on 1-sample non-parametric test (Section 5.1 and Figure 7) performs better on lower coherence values/dierences. The simulated data for x1 include 50 epochs of random standard normal data (white noise) with 1s duration at 500Hz with weight 0.5, combined linearly with a sine waveform at 30Hz with weight 0.05. y1 is built similarly by a linear combination of white noise and sinusoidal waveform. x2 and y2 are similarly constructed, but with the weightings of 1−r and 0.1r between the white noise and sinusoidal components. Artefactual components were added to 10% of epochs (randomly chosen) which were a combination of random white noise with standard deviations of 2, and a random shi between -2 and +2. All the tests were repeated 100 times and the average values are shown. The tests were performed on the values that correspond to 30Hz. The results shown correspond to phase dierence φ = 0; the simulations with other phase dierence values yielded the same results. bioRxiv preprint doi: https://doi.org/10.1101/818906; this version posted October 31, 2019. The copyright holder for this preprint (which was not certified by peer review) is the author/funder. All rights reserved. No reuse allowed without permission.

Non-parametric rank statitics for spectral power and coherence, Nasseroleslami et al. Page 12 of 19

Figure 10. Experimental Data: Both Paramet- ric and Non-parametric Tests Detect Signifi- cant Components in Power Spectrum. Notice that the non-normal distribution of the raw auto- spectra (top) leads to dierence between the mean Figure 9. Simulation: The Non-Parametric 2- and median based estimates of auto-spectrum Sample Statistical Tests based on Spatial Rank (F¯xx and F˜xx). Both the parametric and non- and Spatial Signed Rank for Comparison of the parametric tests detect the significant bio-signal Coherence Phase between 2 Conditions are Ro- components (bottom) up to about 400-500Hz (the bust Against Artefacts. The 1D tests of dierence amplifier filter’s cut-o frequency) with the non- use the circular 2 sample t-test (parametric) and parametric test saturating due to finite sample circular Mann-Whitney U test (non-parametric) as size at lower frequencies with stronger eects, described in section 5.2.1). The 2D tests are 2- while performing better at detecting weaker high- sample Hotelling’s T 2 (parametric) and the 2- frequency components compared to to its para- sample Spatial Rank test (non-parametric). No- metric counterpart. Corrected α corresponds to tice that the 2D non-parametric test performs bet- Bonferroni correction with the number of frequen- ter than 1D tests and 2D non-parametric test and cies. See section 4.1 for details of the tests and sec- is robust. The simulated data is the same as data tion 6.2 for details of the data used. in Figure 8, with r1 = r2 = 0.5, the 0 phase between the sinusoidal components of x1 and x2 and phase dierence of ∆φ between x2 and y2. bioRxiv preprint doi: https://doi.org/10.1101/818906; this version posted October 31, 2019. The copyright holder for this preprint (which was not certified by peer review) is the author/funder. All rights reserved. No reuse allowed without permission.

Non-parametric rank statitics for spectral power and coherence, Nasseroleslami et al. Page 13 of 19

Figure 11. Experimental Data: Both Paramet- ric and Non-parametric Tests Detect Significant Dierences Between 2 Power Spectra. The 2 power spectra (top) correspond to EEG channels C3 and C4 over the le (contra-lateral) and right (ipsilateral) primary motor area of hand during an isometric pincher grip task. The p-values of both Figure 12. Experimental Data: Both Paramet- the parametric and non-parametric tests (bottom) ric and Non-parametric Tests Detect Signifi- detect the significant dierences between the os- cant Presence of Cortico-Muscular Coherence cillation intensity in the 2 hemispheres. Corrected Between an EEG (C ) and an EMG (FDI) sig- α corresponds to Bonferroni correction with the 3 nals. Top: The p-values from the 1D paramet- number of frequencies. See section 4.2 for details ric test on |C¯ y| in Equation (8) and the 2D non- of the tests and section 6.2 for details of the data x parametric Spatial Signed Rank test (section 5.1) used. show comparable detection of significant coher- ence. Corrected α corresponds to Bonferroni cor- rection with the number of frequencies. Mid- dle: The magnitude of coherence estimated us- ing the mean (|C¯xy|) and median (|C˜xy|), fol- low the p-values. Bottom: The phase of coher- ¯ ence estimated using the mean (∠Cxy) and me- ˜ dian (∠Cxy) show close correspondence. See sec- tion 5.1 for details of the tests and section 6.2 for details of the data used. bioRxiv preprint doi: https://doi.org/10.1101/818906; this version posted October 31, 2019. The copyright holder for this preprint (which was not certified by peer review) is the author/funder. All rights reserved. No reuse allowed without permission.

Non-parametric rank statitics for spectral power and coherence, Nasseroleslami et al. Page 14 of 19

Figure 13 show 2 dierent corticomusular EEG-EMG coherence measures: between C3-FDI and between C4-FDI. The median based C˜xy for both pairs show dierences betwen these 2 channel pairs. The exist- ing statistical techniques (parametric) do not provide direct comparisons of these measures at the level of individual subjects. The statistical trick in equation (20) provides a solution for an approximate inference between 2 pairs based on their individual p-values. This 1D comparison of magnitude (chosen to be based on p1 and p2 from non-parametric 1-sample tests) de- tects the changes in coherence strengths which is es- pecially strong for low coherence values. The 2D non- parametric test based on spatial ranks detects changes in amplitude and especially the phase. A significant dierence in the phase of synchrony in meaningful only if each of the signal pairs show a significant coher- ence in 1-sample tests, and, additionally, the 2-sample test yields significant dierences. The certainty about the phase dierence can be achieved if the 1D test of magnitude is non-significant, or alternatively by using a circular Mann-Whitney U-test (section 5.2.1) can con- firm this.

7 Discussion

7.1 The New Perspective and Methods

The new approach for spectral analysis takes into ac- count the statistical distribution of the raw auto- and cross-spectra, enabling working with non-parametric estimates such as median and rank-based statistical tests. This approach which we previously introduced (Dukic et al., 2017) is considerably dierent from the established parametric methods on spectral analyses of time series. The approach to conduct the test on the data in 2D complex plane is a novel direction that can be achieved reasonably only by non-parametric tests (given the complex distribution of the complex data). This approach takes into account both the magni- tude and phase of coherence. This enables the Figure 13. Experimental Data: Both Paramet- ric and Non-parametric Tests Detect Signifi- 1-sample testing of the coherence magnitude non- cant Dierence between Cortico-Muscular Co- parametrically which would not be possible using ex- herence of 2 Signal Pairs. Top: The magnitude ˜ isting methods. Importantly, this 2D approach en- of coherence estimated using the median (|Cxy|), ables the 2-sample comparison of two coherence lev- show dierences between the cortico-muscular coherence in the contralateral and ipsilateral EEG els. This would not be possible otherwise, except electrodes and FDI muscle. Middle: The p-values only for magnitude using the statistical trick in sec- from the 1D parametric test on |C¯xy| using the tion 5.2.2. Importantly these tests are applicable in in- statistical trick for comparing 2 1-sample p-values dividual subjects. (section 5.2.2) and the 2D non-parametric Spa- tial Rank test (section 5.2) both show frequency bands (especially the β band) with maximum dif- ferences. Corrected α corresponds to Bonferroni 7.2 Pros of Cons of Non-Parametric Spec- correction with the number of frequencies. Bot- tom: The phase of coherence estimated using the tral Statistics ˜ median (∠Cxy) when the coherence is significant, Similar to 1D non-parametric tests based on rank is shown for x1(C3) and y(FDI), as well as for x2(C4) and y(FDI). The phase dierence be- statistics such as Wilcoxon’s Signed Rank and Mann- tween 2 signal pairs is only plotted when both the Whitney’s U test, the non-parametric 2D tests based on individual pairs show significant dierence, and when the 2D 2-sample non-parametric test shows significant dierence. See section 5.2 for details of the tests and section 6.2 for details of the data used. bioRxiv preprint doi: https://doi.org/10.1101/818906; this version posted October 31, 2019. The copyright holder for this preprint (which was not certified by peer review) is the author/funder. All rights reserved. No reuse allowed without permission.

Non-parametric rank statitics for spectral power and coherence, Nasseroleslami et al. Page 15 of 19

spatial signed ranks or ranks aord robustness against 7.4.2 Partial and Multiple Spectra artefacts and outliers. They are applicable on arbitrary distributions. Theoretically, and as demonstrated by Other derivatives of the spectral measures, such as the simulations they may not be as eective or powerful as partial spectra, partial coherence (Lindsay & Rosen- parametric counterparts. Nevertheless in practical sit- berg, 2011) and multiple coherence (D. M. Halliday & uations as shown in the real data, they provided very Rosenberg, 1999) can be similarly tested using non- acceptable performance. parametric methods, as they are similarly expressed in the 2-D complex plane. Care should be exercised The non-parametric methods help to avoid com- when the null hypotheses of these measures may vary putationally expensive bootstrapping methods when in specific applications. parametric methods are not available or are not pre- ferred, as they do not suer from unwanted variability in estimations. 7.4.3 Group Analysis The magnitude of non-parametric coherence C˜ is xy Combination of time series data from several subjects directly related to the p-values from the tests. How- or several experimental sessions can be achieved us- ever, unlike the parametric estimates, a closed-form ing the pooled coherence (D. M. Halliday & Rosenberg, solution is still unknown or does not exist. This is not a 1999) of all the raw data points in a group. Alterna- concern as the bias of the coherence measure (a func- tively this can be achieved using the existing methods tion of the number of epochs L) makes any interpreta- for combining the p-values such as Stouer’s method tions dependent on the p-values associated to the co- (Stouer, 1977; Westfall, 2014). herence values. Non-parametric methods aord this p-value which can be plotted as −log10(p) spectrum and used as a more informative spectrum. 7.4.4 High-Dimensional Statistics Scientific inference from neural time series such 7.3 Applications as EEG and EMG signals may rely on analyses in high dimensions encompassing time, frequency and These developments and methods, while useful for space/channels. The p-values from parametric and broad range of neurophysiological research as well as non-parametric analyses can be similarly corrected in neuro-electro-magnetic source imaging, are espe- for multiple comparisons using the eective num- cially necessary for comparison of pathological con- ber of components (Nasseroleslami et al., 2014), ditions against healthy individuals. Importantly, the random-field theory (Siegmund & Worsley, 1995; new methods allow analyses at individual subject Mehrkanoon et al., 2014), or (adaptive) False Discov- level which would only be practical at the level of sub- ery Rate (Benjamini & Hochberg, 1995; Benjamini et ject/patient levels. al., 2006). Methods such as Empirical Bayesian In- ference Efron, 2007; Nasseroleslami, 2018 applied to high-dimensional analyses of spectral measures 7.4 Extension to Other Measures and (Nasseroleslami et al., 2017) aords the estimation of Analyses and statistical power. Therefore, multiple comparison is straight-forward with new sta- Given the general nature of the methods, they can be tistical methods. similarly used in an extended range of methods and analyses. 7.4.5 Source Analysis

7.4.1 Frequency and Time-Frequency Measures The non-parametric statistical methods on spectral measures would greatly benefit the analysis of neu- The methods can be similarly applied on most of ral activity and connectivity in neuro-electro-magnetic the complex-values frequency and time-frequency source analysis (Ramírez, Wipf, & Baillet, 2010). Given method. Examples include the spectra or coherence the application of spectral source anad connectiv- measures calculated using the Welch’s overlapping ity analysis in healthy individuals and patient groups window (Terry & Griin, 2008), spectral smoothing ap- (Muthuraman et al., 2018; A. R. Anwar et al., 2016) and proach, or Multi-Taper techniques (Babadi & Brown, the crucial need to use robust unbiased measures of 2014; D. M. Halliday, Brittain, Stevenson, & Mason, connectivity, the proposed methods can be of great 2018). Time-frequency representations based on com- utility. plex values, including Short-Time Fourier Transform and Morlet (Boashash, 2003; Misiti, Mis- 7.4.6 Future Directions iti, Oppenheim, & Poggi, 2007) and their variations (Nasseroleslami et al., 2014; Mehrkanoon, Breakspear, Future direction should work more on better ways to Daertshofer, & Boonstra, 2013) can be similarly tested estimate the statistical power. This is automatically using the non-parametric techniques. taken care of with some multi-variate methods such bioRxiv preprint doi: https://doi.org/10.1101/818906; this version posted October 31, 2019. The copyright holder for this preprint (which was not certified by peer review) is the author/funder. All rights reserved. No reuse allowed without permission.

Non-parametric rank statitics for spectral power and coherence, Nasseroleslami et al. Page 16 of 19

as empirical Bayesian inference. However, currently, Anwar, A., Mideska, K., Hellriegel, H., Hoogenboom, the straight-forward method for finding power in low- N., Krause, H., Schnitzler, A., ... Muthuraman, M. dimensional analysis is through non-null bootstrap- (2014, August). Multi-modal causality analysis of ping. eyes-open and eyes-closed data from simulta- Paired 2-sample testing may be a possibility de- neously recorded EEG and MEG. In 2014 36th An- pending on the nature of analysis. This has not been nual International Conference of the IEEE Engi- adequately addressed to date. However, both para- neering in Medicine and Biology Society (EMBC) metric and non-parametric methods can be poten- (pp. 2825–2828). 2014 36th Annual International tially used for such analyses and is expected to aord Conference of the IEEE Engineering in Medicine additional statistical power where applicable.. and Biology Society (EMBC). doi:10 . 1109 / EMBC.2014.6944211 Babadi, B. & Brown, E. N. (2014, May). A Review 8 Conclusions and Recommenda- of Multitaper Spectral Analysis. IEEE Transac- tions tions on Biomedical Engineering, 61(5), 1555– 1564. doi:10.1109/TBME.2014.2311996 Non-parametric statistical analysis of spectral power Beasley, T. M., Erickson, S., & Allison, D. B. (2009, and coherence can be used in several practical situa- September 1). Rank-Based Inverse Normal tions on 1-sample and 2-sample problems. In addition Transformations are Increasingly Used, But to the robustness aorded by non-parametric mea- are They Merited? Behav Genet, 39(5), 580. sures, based on rank or median, these statistical tech- doi:10.1007/s10519-009-9281-0 niques are not restricted by parametric assumptions in Benjamini, Y. & Hochberg, Y. (1995, January 1). Con- traditional analysis and can be used in broader ranges trolling the False Discovery Rate: A Practical and of comparisons in neural signal analysis. In addition Powerful Approach to Multiple Testing. Journal to rank-based 1-sample and 2-sample tests for com- of the Royal Statistical Society. Series B (Method- paring spectral power, the 2D Spatial Signed Rank and ological), 57(1), 289–300. Spatial Rank Tests are the recommended tests for as- Benjamini, Y., Krieger, A. M., & Yekutieli, D. (2006, sessing the significance of coherence in 1-sample and January 9). Adaptive linear step-up procedures 2-sample problems. that control the false discovery rate. Biometrika, 93(3), 491–507. doi:10.1093/biomet/93.3.491 Bloomfield, P. (2004, April 5). Fourier Analysis of Time Acknowledgement Series: An Introduction. John Wiley & Sons. Boashash, B. (Ed.). (2003). Time-frequency signal anal- The support of students and sta at Trinity College ysis and processing: A comprehensive reference. Dublin, the University of Dublin is highly appreciated. Elsevier. This work was supported by Irish Research Council Boonstra, T. W. (2013). The potential of corticomuscu- (Government of Ireland Postdoctoral Research Fellow- lar and intermuscular coherence for research on ship GOIPD/2015/213 to B.N.), Science Foundation Ire- human motor control. Front. Hum. Neurosci, 7, land (award SFI/16/ERCD/3854), and Health Research 855. doi:10.3389/fnhum.2013.00855 Board of Ireland (award HRA-POR-2013-246). Box, G. E. P.& Cox, D. R. (1964, January 1). An Analysis of Transformations. Journal of the Royal Statistical Society. Series B (Methodological), 26(2), 211–252. References JSTOR: 2984418 Brillinger, D. R. (2001, September 1). Time Series: Data Akritas, M. G., Lahiri, S. N., & Politis, D. N. (Eds.). Analysis and Theory. SIAM. (2014). Topics in . New Cohen, M. X. (2014, January 17). Analyzing Neural Time York, NY: Springer New York. Springer Proceed- Series Data: Theory and Practice (1 edition). Cam- ings in Mathematics & Statistics. bridge, Massachusetts: The MIT Press. Anwar, A. R., Muthalib, M., Perrey, S., Galka, A., Granert, Conway, B. A., Halliday, D. M., Farmer, S. F., Shahani, U., O., Wol, S., ... Muthuraman, M. (2016, July 20). Maas, P., Weir, A. I., & Rosenberg, J. R. (1995, De- Eective Connectivity of Cortical Sensorimotor cember). Synchronization between motor cor- Networks During Finger Movement Tasks: A Si- tex and spinal motoneuronal pool during the multaneous fNIRS, fMRI, EEG Study. Brain To- performance of a maintained motor task in man. pogr, 1–16. doi:10.1007/s10548-016-0507-1 J Physiol, 489 ( Pt 3), 917–924. doi:10 . 1113 / jphysiol.1995.sp021104 Dukic, S., Iyer, P. M., Mohr, K., Hardiman, O., Lalor, E. C., & Nasseroleslami, B. (2017, July). Estima- tion of coherence using the median is robust against EEG artefacts. In 2017 39th Annual Inter- bioRxiv preprint doi: https://doi.org/10.1101/818906; this version posted October 31, 2019. The copyright holder for this preprint (which was not certified by peer review) is the author/funder. All rights reserved. No reuse allowed without permission.

Non-parametric rank statitics for spectral power and coherence, Nasseroleslami et al. Page 17 of 19

national Conference of the IEEE Engineering in Resting-State EEG as Potential Biomarker for Medicine and Biology Society (EMBC) (pp. 3949– Amyotrophic Lateral Sclerosis. PLoS ONE, 10(6), 3952). 2017 39th Annual International Confer- e0128682. doi:10.1371/journal.pone.0128682 ence of the IEEE Engineering in Medicine and Jurečková, J. & Kalina, J. (2012, February). Nonpara- Biology Society (EMBC). doi:10 . 1109 / EMBC . metric multivariate rank tests and their unbi- 2017.8037720 asedness. Bernoulli, 18(1), 229–251. doi:10.3150/ Efron, B. (2004). Large-Scale Simultaneous Hypothesis 10-BEJ326 Testing: The Choice of a Null Hypothesis. Journal Koles, Z. J. & Flor-Henry, P. (1987, May). The eect of the American Statistical Association, 99(465), of brain function on coherence patterns in the 96–104. bipolar EEG. Int J Psychophysiol, 5(1), 63–71. Efron, B. (2007, August). Size, power and false discov- pmid: 3597171 ery rates. Ann. Statist. 35(4), 1351–1377. doi:10 . Lindsay, K. A. & Rosenberg, J. R. [J R]. (2011, June). 1214/009053606000001460 Identification of directed interactions in net- Efron, B., Tibshirani, R., Storey, J. D., & Tusher, V. works. Biol Cybern, 104(6), 385–396. doi:10 . (2001). Empirical Bayes analysis of a microarray 1007/s00422-011-0437-7. pmid: 21678101 . Journal of the American statistical Mehrkanoon, S., Breakspear, M., & Boonstra, T. W. association, 96(456), 1151–1160. doi:10 . 1198 / (2014, October 15). The reorganization of corti- 016214501753382129 comuscular coherence during a transition be- Farmer, S. F., Bremner, F. D., Halliday, D. M., Rosen- tween sensorimotor states. NeuroImage, 100, berg, J. R., & Stephens, J. A. (1993). The fre- 692–702. doi:10.1016/j.neuroimage.2014.06. quency content of common synaptic inputs to 050 motoneurones studied during voluntary isomet- Mehrkanoon, S., Breakspear, M., Daertshofer, A., & ric contraction in man. The Journal of Physiol- Boonstra, T. W. (2013). Non-identical smoothing ogy, 470(1), 127–155. Retrieved July 2, 2013, from operators for estimating time-frequency inter- http://jp.physoc.org/content/470/1/127. dependence in electrophysiological recordings. short EURASIP Journal on Advances in Signal Process- Fisher, K. M., Zaaimi, B., Williams, T. L., Baker, S. N., & ing, 2013(1), 1. Retrieved October 9, 2016, from Baker, M. R. (2012, January 9). Beta-band inter- http : / / asp . eurasipjournals . springeropen . muscular coherence: A novel biomarker of up- com/articles/10.1186/1687-6180-2013-73 per motor neuron dysfunction in motor neuron Misiti, M., Misiti, Y., Oppenheim, G., & Poggi, J.-M. disease. Brain, 135(9), 2849–2864. doi:10.1093/ (2007). Wavelets and their applications (M. Mis- brain/aws150. pmid: 22734124 iti, Y. Misiti, G. Oppenheim, & J.-M. Poggi, Eds.). Fisher, N. I. (1995, October 12). Statistical Analysis of Cir- London: ISTE. cular Data. Cambridge University Press. Mohr, K., Nasseroleslami, B., Iyer, P. M., Hardiman, O., Halliday, D., Rosenberg, J., Amjad, A., Breeze, P., Con- & Lalor, E. C. (2017, May 6). EyeBallGUI: A Tool for way, B., & Farmer, S. (1995). A framework for Visual Inspection and Binary Marking of Multi- the analysis of mixed time series/point pro- Channel Bio-Signals. bioRxiv, 129437. doi:10 . cess data—Theory and application to the study 1101/129437 of physiological tremor, single motor unit dis- Muthuraman, M., Raethjen, J., Koirala, N., Anwar, charges and electromyograms. Progress in Bio- A. R., Mideksa, K. G., Elble, R., ... Deuschl, G. physics and Molecular Biology, 64(2–3), 237–278. (2018). Cerebello-cortical network fingerprints doi:10.1016/S0079-6107(96)00009-0 dier between essential, Parkinson’s and mim- Halliday, D. M., Brittain, J.-S., Stevenson, C. W., & Ma- icked tremors. Brain. doi:10 . 1093 / brain / son, R. (2018). Adaptive spectral tracking for co- awy098 herence estimation: The z -tracker. J. Neural Eng. Nasseroleslami, B. (2018, June 8). An Implementa- 15(2), 026004. doi:10.1088/1741-2552/aaa3b4 tion of Empirical Bayesian Inference and Non- Halliday, D. M. & Rosenberg, J. R. [Jay R.]. (1999). Time Null Bootstrapping for Threshold Selection and and frequency domain analysis of spike train Power Estimation in Multiple and Single Statis- and time series data. In Modern techniques in tical Testing. bioRxiv, 342964. doi:10 . 1101 / neuroscience research (pp. 503–543). Springer. 342964 Retrieved July 1, 2013, from http://doi.org/10. Nasseroleslami, B., Dukic, S., Broderick, M., Mohr, K., 1007/978-3-642-58552-4_18 Schuster, C., Gavin, B., ... Hardiman, O. (2017, Hotelling, H. (1931, August). The Generalization of Stu- November). Characteristic Increases in EEG Con- dent’s Ratio. Ann. Math. Statist. 2(3), 360–378. nectivity Correlate With Changes of Structural doi:10.1214/aoms/1177732979 MRI in Amyotrophic Lateral Sclerosis. Cereb Cor- Iyer, P. M., Egan, C., Pinto-Grau, M., Burke, T., Elamin, tex, 1–15. doi:10.1093/cercor/bhx301 M., Nasseroleslami, B., ... Hardiman, O. (2015, Nasseroleslami, B., Lakany, H., & Conway, B. A. (2014, June 19). Functional Connectivity Changes in April 15). EEG signatures of arm isometric ex- bioRxiv preprint doi: https://doi.org/10.1101/818906; this version posted October 31, 2019. The copyright holder for this preprint (which was not certified by peer review) is the author/funder. All rights reserved. No reuse allowed without permission.

Non-parametric rank statitics for spectral power and coherence, Nasseroleslami et al. Page 18 of 19

ertions in preparation, planning and execu- T. Colton (Eds.), Encyclopedia of . tion. NeuroImage, 90, 1–14. doi:10 . 1016 / j . Chichester, UK: John Wiley & Sons, Ltd. doi:10. neuroimage.2013.12.011 1002/0470011815.b2a13052 Niinimaa, A. & Oja, H. [H.]. (2006). Multivariate Median. Sen, P. K. [Pranab Kumar] & Puri, M. L. (1967). On the In Encyclopedia of Statistical Sciences. Ameri- theory of rank order tests for location in the can Cancer Society. doi:10.1002/0471667196. multivariate one sample problem. The Annals of ess1107.pub2 Mathematical Statistics, 1216–1228. Nolan, H., Whelan, R., & Reilly, R. B. (2010, September Siegel, M., Donner, T. H., & Engel, A. K. (2012, Febru- 30). FASTER: Fully Automated Statistical Thresh- ary). Spectral fingerprints of large-scale neu- olding for EEG artifact Rejection. Journal of Neu- ronal interactions. Nat Rev Neurosci, 13(2), 121– roscience Methods, 192(1), 152–162. doi:10.1016/ 134. doi:10.1038/nrn3137 j.jneumeth.2010.07.015 Siegmund, D. O. & Worsley, K. J. (1995, April). Test- Nordhausen, K., Mottonen, J., & Oja, H. (2018, March ing for a Signal with Unknown Location and 3). MNM: Multivariate Nonparametric Methods. Scale in a Stationary Gaussian Random Field. An Approach Based on Spatial Signs and Ranks Ann. Statist. 23(2), 608–639. doi:10.1214/aos/ (Version 1.0-3). Retrieved May 21, 2018, from 1176324539 https : / / CRAN . R - project . org / package = Stouer, S. A. (1977). The American Soldier: Adjustment MNM during army life. Military Aairs/Aerospace His- Nordhausen, K. & Oja, H. [Hannu]. (2011). Multivariate L torian. 1 Methods: The Package MNM. Journal of Statis- Tatum, W. O., Dworetzky, B. A., & Schomer, D. L. (2011, tical Soware, 43(5). doi:10.18637/jss.v043.i05 June). Artifact and recording concepts in EEG. J Oja, H. [Hannu]. (2010, March 25). Multivariate Non- Clin Neurophysiol, 28(3), 252–263. doi:10.1097/ parametric Methods with R: An approach based WNP.0b013e31821c3c93 on spatial signs and ranks. Springer. Terry, K. & Griin, L. (2008, February). How compu- Oja, H. [Hannu] & Randles, R. H. (2004, Novem- tational technique and spike train properties ber). Multivariate Nonparametric Tests. Statis- aect coherence detection. Journal of Neuro- tical Science, 19(4), 598–605. doi:10 . 1214 / science Methods, 168(1), 212–223. doi:10 . 1016 / 088342304000000558 j.jneumeth.2007.09.014 Person, R. S. & Kudina, L. P. (1968). Cross-correlation van Ede, F., Quinn, A. J., Woolrich, M. W., & Nobre, A. C. of electromyograms showing interference pat- (2018, May 5). Neural Oscillations: Sustained terns. Electroencephalography and clinical neu- Rhythms or Transient Burst-Events? Trends in rophysiology, 25(1), 58–68. Retrieved November Neurosciences. doi:10.1016/j.tins.2018.04.004 28, 2016, from http://www.sciencedirect.com/ Vuckovic, A. [A.], Hasan, M. A., Osuagwu, B., Fraser, M., science/article/pii/0013469468900874 Allan, D. B., Conway, B. A., & Nasseroleslami, B. Priestley, M. B. (1982). Spectral Analysis and Time Se- (2015, November). The influence of central neu- ries. Academic Press. ropathic pain in paraplegic patients on perfor- Puri, M. L. & Sen, P.K. [Pranab Kumar]. (1971). Nonpara- mance of a motor imagery based Brain Com- metric methods in multivariate analysis. Krieger puter Interface. Clinical Neurophysiology, 126(11), Pub. Co. 2170–2180. doi:10.1016/j.clinph.2014.12.033 R Core Team. (2016). R: A Language and Environ- Vuckovic, A. [Aleksandra], Hasan, M. A., Fraser, M., Con- ment for Statistical Computing. Vienna, Aus- way, B. A., Nasseroleslami, B., & Allan, D. B. tria: R Foundation for Statistical Computing. Re- (2014, June). Dynamic Oscillatory Signatures of trieved from https://www.R-project.org Central Neuropathic Pain in Spinal Cord Injury. Ramírez, R. R., Wipf, D., & Baillet, S. (2010). Neuroelec- The Journal of Pain, 15(6), 645–655. doi:10.1016/ tromagnetic Source Imaging of Brain Dynamics. j.jpain.2014.02.005 In W. Chaovalitwongse, P. M. Pardalos, & P. Xan- Waldert, S., Pistohl, T., Braun, C., Ball, T., Aertsen, A., thopoulos (Eds.), Computational Neuroscience & Mehring, C. (2009, May). A review on direc- (Vol. 38, pp. 127–155). New York, NY: Springer tional information in neural signals for brain- New York. Retrieved September 28, 2015, from machine interfaces. Journal of Physiology-Paris. doi.org/10.1007/978-0-387-88630-5_8 Neurorobotics, 103(3–5), 244–254. doi:10.1016/ Rosenberg, J. R. [J. R.], Halliday, D. M., Breeze, P., & j.jphysparis.2009.08.007 Conway, B. A. (1998, August 31). Identification of Walter, D. O. (1963, August). Spectral analysis for elec- patterns of neuronal connectivity—partial spec- troencephalograms: Mathematical determina- tra, partial coherence, and neuronal interac- tion of neurophysiological relationships from tions. Journal of Neuroscience Methods, 83(1), records of limited duration. Experimental Neu- 57–72. doi:10.1016/S0165-0270(98)00061-2 rology, 8(2), 155–181. doi:10 . 1016 / 0014 - Sen, P. K. [Pranab K.]. (2005, July 15). Multivariate 4886(63)90042-6 Median and Rank Sum Tests. In P. Armitage & bioRxiv preprint doi: https://doi.org/10.1101/818906; this version posted October 31, 2019. The copyright holder for this preprint (which was not certified by peer review) is the author/funder. All rights reserved. No reuse allowed without permission.

Non-parametric rank statitics for spectral power and coherence, Nasseroleslami et al. Page 19 of 19

Watson, G. S. & Williams, E. J. (1956). On the Construc- tion of Significance Tests on the Circle and the Sphere. Biometrika, 43(3/4), 344–352. doi:10 . 2307/2332913. JSTOR: 2332913 Westfall, P. H. (2014). Combining P-values. In Wiley StatsRef: Statistics Reference Online. John Wi- ley & Sons, Ltd. doi:10 . 1002 / 9781118445112 . stat05891 Wijk, V., M, B. C., Beek, P. J., & Daertshofer, A. (2012). Neural synchrony within the motor sys- tem: What have we learned so far? Front. Hum. Neurosci. 6. doi:10.3389/fnhum.2012.00252 Xu, R., JIANG, N., Vuckovic, A., Hasan, M., Mrachacz- Kersting, N., Allan, D., ... Farina, D. (2014, Au- gust 27). Movement-related cortical potentials in paraplegic patients: Abnormal patterns and con- siderations for BCI-rehabilitation. Front. Neuro- eng. 7, 35. doi:10.3389/fneng.2014.00035