<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=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 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";
        mso-fareast-language:EN-US;}
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;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:10.0pt;
        margin-left:36.0pt;
        mso-add-space:auto;
        line-height:115%;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
        {mso-style-priority:34;
        mso-style-type:export-only;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        mso-add-space:auto;
        line-height:115%;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
        {mso-style-priority:34;
        mso-style-type:export-only;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        mso-add-space:auto;
        line-height:115%;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
        {mso-style-priority:34;
        mso-style-type:export-only;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:10.0pt;
        margin-left:36.0pt;
        mso-add-space:auto;
        line-height:115%;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:2105420843;
        mso-list-type:hybrid;
        mso-list-template-ids:1290713564 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></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 lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hello Fieldtrip experts,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">currently I’m working on an intracranial dataset with low amount of subjects who participated repeatedly in an experiment with two different conditions.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">In detail:<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpFirst" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span lang="EN-US" style="font-family:Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">       
</span></span></span><![endif]><span lang="EN-US">LFP data from only three subjects.
<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span lang="EN-US" style="font-family:Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">       
</span></span></span><![endif]><span lang="EN-US">Each subject participated several times in the same experiment (about 16 sessions per subject).
<o:p></o:p></span></p>
<p class="MsoListParagraphCxSpLast" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span lang="EN-US" style="font-family:Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">       
</span></span></span><![endif]><span lang="EN-US">In every session subjects performed around 50 trials of condition A and around 50 trials of condition B<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I calculated time-frequency spectra (TFS) for the LFP’s. To test if there are significant differences between the TFS(condition A) and TFS(condition B) I want to use the permutation test implemented in fieldtrip. Unfortunately
 I’m struggling with my little statistic knowledge, because of the low amount of subjects and the high repetition rate for every subject in multiple sessions.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Here is what I have done so far, and it would be great if anyone could tell me if it is correct or totally bullshit.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">First I averaged over all trials, so I put one TFS for each condition and session in the statistic. The first row of the design matrix represent the repetition of the single subjects (in this case three) and the second
 row of the design matrix contains the two conditions A (as 1) and B (as 2).<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;text-autospace:none">
<span lang="EN-US" style="font-family:"Courier New";color:black">cfg = [];</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;text-autospace:none">
<span lang="EN-US" style="font-family:"Courier New";color:black">cfg.parameter = </span>
<span lang="EN-US" style="font-family:"Courier New";color:#A020F0">'powspctrm'</span><span lang="EN-US" style="font-family:"Courier New";color:black">;</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;text-autospace:none">
<span lang="EN-US" style="font-family:"Courier New";color:black">cfg.numrandomization = 5000;</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;text-autospace:none">
<span lang="EN-US" style="font-family:"Courier New";color:black">cfg.method = </span>
<span lang="EN-US" style="font-family:"Courier New";color:#A020F0">'montecarlo'</span><span lang="EN-US" style="font-family:"Courier New";color:black">;</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;text-autospace:none">
<span lang="EN-US" style="font-family:"Courier New";color:black">cfg.correctm = </span>
<span lang="EN-US" style="font-family:"Courier New";color:#A020F0">'fdr'</span><span lang="EN-US" style="font-family:"Courier New";color:black">;</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;text-autospace:none">
<span lang="EN-US" style="font-family:"Courier New";color:black">cfg.alpha = 0.05;</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;text-autospace:none">
<span lang="EN-US" style="font-family:"Courier New";color:black">cfg.correcttail =
</span><span lang="EN-US" style="font-family:"Courier New";color:#A020F0">'prob'</span><span lang="EN-US" style="font-family:"Courier New";color:black">;</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;text-autospace:none">
<span lang="EN-US" style="font-family:"Courier New";color:black">cfg.ivar = 2;</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;text-autospace:none">
<span lang="EN-US" style="font-family:"Courier New";color:black">cfg.uvar = 1;</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;text-autospace:none">
<span lang="EN-US" style="font-family:"Courier New";color:black">cfg.statistic = </span>
<span lang="EN-US" style="font-family:"Courier New";color:#A020F0">'ft_statfun_depsamplesT'</span><span lang="EN-US" style="font-family:"Courier New";color:black">;</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;text-autospace:none">
<span lang="EN-US" style="font-family:"Courier New";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;text-autospace:none">
<span lang="EN-US" style="font-family:"Courier New";color:black">design = [1 1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 1 1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
 2 2 2 2 2 2];</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;text-autospace:none">
<span lang="EN-US" style="font-family:"Courier New";color:black">cfg.design = design;</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;text-autospace:none">
<span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;text-autospace:none">
<span lang="EN-US" style="font-size:13.0pt;font-family:"Courier New";color:black">stat = ft_freqstatistics(cfg, data_A, data_B);</span><span lang="EN-US" style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks in advance!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Iris<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>