# [FieldTrip] Problems with statistics for circular data

Thomas.Baumgarten at med.uni-duesseldorf.de Thomas.Baumgarten at med.uni-duesseldorf.de
Wed Jan 15 09:35:07 CET 2014

```Dear FieldTrip users,
I am working on a set of circular data (phase angles of ongoing oscillations computed via Hilbert transform) and would like to statistically compare two conditions (A,B). For this, I use the circular statistics toolbox for matlab by P. Berens. I worked on this problem from two different angles:
1. First, I tried to directly compare the two conditions via the Watson-Williams two-sample test (function: circ_wwtest). Unfortunately, this didn't work out, since the test requires an average resultant vector length of > 0.45 for n >= 11 entries/ subjects, an assumption which is not met by my data.
2. Second, I tried to calculate the angle of difference between the two conditions (angle(A) - angle(B)) and then used  the one-sample mean angle test (function: circ_mtest) to test if the resulting angle of difference is significantly different from zero. Here, the following problems arise: Since the resulting angles for A and B range from -pi to +pi, there are cases when the subtraction of the two angles results in roughly +2pi or -2pi (e.g. cases where (A = pi) - (B = -pi) = 2pi), resulting in an error from the circ_mtest function. I tried to solve this problem by using a modulus (2pi) operation (i.e. by 'cleaning out' the redundant circumventions while at the same time preserving the angle information), but unfortunately this didn't work out either.
The only other option I can think of would be to generate surrogate data (i.e. a matrix with the same dimensions as the matrix with the angles of difference , only filled with zeros) and to apply a cluster-based permutation test (similar to ft_freqstatitics). Although this would take care of my multiple-comparison problem, I am not quite sure if the cluster correction is still valid in this case and if this test would work for circular data.
I would greatly appreciate any comments and advice on this matter.
Thanks for your help,
Thomas

Thomas Baumgarten, PhD Student
Institute of Clinical Neuroscience and Medical Psychology, Medical Faculty, Heinrich-Heine-University Düsseldorf, Universitätsstraße 1, 40225 Düsseldorf, Germany
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140115/2dd571ff/attachment-0001.html>
```