<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin-top:0cm;
        margin-right:0cm;
        margin-bottom:10.0pt;
        margin-left:0cm;
        line-height:115%;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.E-MailFormatvorlage17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:Consolas;
        color:black;}
span.E-MailFormatvorlage20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Dear Tobias,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thank you for the hint! Indeed, this makes the calculation of the circular difference much easier and the resulting values stay between -pi and pi. Sorry that I didn’t think of this, since the purpose of the
 function is rather obvious.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thomas<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal">
<b><span lang="DE" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">Von:</span></b><span lang="DE" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> fieldtrip-bounces@science.ru.nl [mailto:fieldtrip-bounces@science.ru.nl]
<b>Im Auftrag von </b>Tobias Staudigl<br>
<b>Gesendet:</b> Mittwoch, 15. Januar 2014 10:19<br>
<b>An:</b> FieldTrip discussion list<br>
<b>Betreff:</b> Re: [FieldTrip] Problems with statistics for circular data<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Dear Thomas, <br>
<br>
try using circ_dist.m (in the circ_stats toolbox by Berens). <br>
This should solve the circular difference issue.<br>
<br>
all the best, <br>
Tobias<br>
<br>
Am 15.01.2014 09:35, schrieb <a href="mailto:Thomas.Baumgarten@med.uni-duesseldorf.de">
Thomas.Baumgarten@med.uni-duesseldorf.de</a>:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;line-height:115%">Dear FieldTrip users,</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;line-height:115%">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:
</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;line-height:115%">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.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;line-height:115%">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.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;line-height:115%">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.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;line-height:115%">I would greatly appreciate any comments and advice on this matter.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;line-height:115%">Thanks for your help,</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;line-height:115%">Thomas</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;line-height:115%"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;line-height:115%"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt"><span lang="EN-GB" style="font-size:9.0pt;line-height:115%">Thomas Baumgarten, PhD Student</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt"><span lang="EN-GB" style="font-size:9.0pt;line-height:115%">Institute of Clinical Neuroscience and Medical Psychology, Medical Faculty, Heinrich-Heine-University Düsseldorf, Universitätsstraße
 1, 40225 Düsseldorf, Germany</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal">
<span style="font-size:12.0pt;font-family:"Times New Roman","serif""><br>
<br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>fieldtrip mailing list<o:p></o:p></pre>
<pre><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><o:p></o:p></pre>
<pre><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal">
<span style="font-size:12.0pt;font-family:"Times New Roman","serif""><br>
<br>
<br>
<o:p></o:p></span></p>
<pre>-- <o:p></o:p></pre>
<pre>Dr. Tobias Staudigl<o:p></o:p></pre>
<pre>Fachbereich Psychologie - ZPR<o:p></o:p></pre>
<pre>Postfach ZPR<o:p></o:p></pre>
<pre>78457 Konstanz<o:p></o:p></pre>
<pre>ZPR, Haus 12<o:p></o:p></pre>
<pre>Tel.: +49 (0)7531 / 88 - 5703<o:p></o:p></pre>
</div>
</body>
</html>