<div dir="ltr"><p class="MsoNormal"><span lang="EN-US">Dear
Fieldtrippers,</span></p>

<p class="MsoNormal"><span lang="EN-US">I recently
observed a strange behavior with the results provided with the regression
statistics provided by “</span><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial">ft_statfun_depsamplesregrT”:</span></p>

<p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial">I did a regression test on 3 conditions: cond1, cond2 and cond3:</span></p>

<p class="MsoNormal"><span lang="EN-US">Here are the
results:</span></p><p class="MsoNormal"><span lang="EN-US"><br></span></p><p class="MsoNormal"><span lang="EN-US"><img src="cid:ii_15607b35d29e022e" alt="Images intégrées 1" width="428" height="291"><br></span></p>

<p class="MsoNormal" align="center" style="text-align:center"><span lang="EN-US"></span></p>

<p class="MsoNormal"><span lang="EN-US"> </span></p>

<p class="MsoNormal"><b><span lang="EN-US">Output for group-level regression test:</span></b></p>

<p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial">the call to "ft_timelockgrandaverage" took 36 seconds and
required the additional allocation of an estimated 0 MB</span><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif"><br>
<span style="background-image:initial;background-repeat:initial">reading
layout from file /neurospin/meg/meg_tmp/MTT_MEG_Baptiste/From_laptop/fieldtrip-20130901/template/layout/NM306mag.lay</span><br>
<span style="background-image:initial;background-repeat:initial">the call
to "ft_prepare_layout" took 0 seconds and required the additional
allocation of an estimated 0 MB</span><br>
<span style="background-image:initial;background-repeat:initial">the call
to "ft_selectdata" took 0 seconds and required the additional
allocation of an estimated 0 MB</span><br>
<span style="background-image:initial;background-repeat:initial">using
"ft_statistics_montecarlo" for the statistical testing</span><br>
<span style="background-image:initial;background-repeat:initial">using
"ft_statfun_depsamplesregrT" for the single-sample statistics</span><br>
<span style="background-image:initial;background-repeat:initial">constructing
randomized design</span><br>
<span style="background-image:initial;background-repeat:initial">total
number of measurements     = 57</span><br>
<span style="background-image:initial;background-repeat:initial">total
number of variables        = 2</span><br>
<span style="background-image:initial;background-repeat:initial">number of
independent variables  = 1</span><br>
<span style="background-image:initial;background-repeat:initial">number of
unit variables         = 1</span><br>
<span style="background-image:initial;background-repeat:initial">number of
within-cell variables  = 0</span><br>
<span style="background-image:initial;background-repeat:initial">number of
control variables      = 0</span><br>
<span style="background-image:initial;background-repeat:initial">using a
permutation resampling approach</span><br>
<span style="background-image:initial;background-repeat:initial">repeated
measurement in variable 1 over 19 levels</span><br>
<span style="background-image:initial;background-repeat:initial">number of
repeated measurements in each level is 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3<span class=""> </span></span><br>
<span style="background-image:initial;background-repeat:initial">computing
a parametric threshold for clustering</span><br>
<span style="background-image:initial;background-repeat:initial">computing
statistic</span><br>
<span style="background-image:initial;background-repeat:initial">estimated
time per randomization is 0.26 seconds</span><br>
<span style="background-image:initial;background-repeat:initial">computing
statistic 1000 from 1000</span><br>
<br>
<span style="background-image:initial;background-repeat:initial">Warning:
adding /neurospin/meg/meg_tmp/MTT_MEG_Baptiste/fieldtrip-20160719/external/spm8
toolbox to your MATLAB path<span class=""> </span></span><br>
<span style="background-image:initial;background-repeat:initial">found 13
positive clusters in observed data</span><br>
<span style="background-image:initial;background-repeat:initial">found 9
negative clusters in observed data</span><br>
<span style="background-image:initial;background-repeat:initial">computing
clusters in randomization</span><br>
<span style="background-image:initial;background-repeat:initial">computing
clusters in randomization 1000 from 1000</span><br>
<br>
<span style="background-image:initial;background-repeat:initial">using a
cluster-based method for multiple comparison correction</span><br>
<span style="background-image:initial;background-repeat:initial">the
returned probabilities and the thresholded mask are corrected for multiple
comparisons</span><br>
<span style="background-image:initial;background-repeat:initial">the call
to "ft_timelockstatistics" took 55 seconds and required the
additional allocation of an estimated 12 MB</span></span></p>

<p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial"> </span></p>

<p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial">Afterwards, for some other reasons I performed directly a T-test between
condition 1 and condition 3. Here is the result:</span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial"><br></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial"><img src="cid:ii_15607b394ad9a5b0" alt="Images intégrées 2" width="428" height="302"><br></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial"><br></span></p>

<p class="MsoNormal" align="center" style="text-align:center"><span style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial"></span><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial"></span></p>

<p class="MsoNormal"><b><span lang="EN-US">Output for group-level T-test:</span></b></p>

<p class="MsoNormal"><span class="im"><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial">the call to "ft_timelockgrandaverage"
took 36 seconds and required the additional allocation of an estimated 0 MB</span></span><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;color:rgb(80,0,80);background-image:initial;background-repeat:initial"><br>
<span class="im">reading layout from file /neurospin/meg/meg_tmp/MTT_MEG_Baptiste/From_laptop/fieldtrip-20130901/template/layout/NM306mag.lay</span><br>
<span class="im">the call to "ft_prepare_layout" took 0 seconds and
required the additional allocation of an estimated 0 MB</span><br>
<span class="im">the call to "ft_selectdata" took 0 seconds and
required the additional allocation of an estimated 0 MB</span><br>
<span class="im">using "ft_statistics_montecarlo" for the statistical
testing</span><br>
</span><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial"></span>using "ft_statfun_depsamplesT" for the
single-sample statistics<span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif"><br>
<span style="background-image:initial;background-repeat:initial">constructing
randomized design</span><br>
<span style="background-image:initial;background-repeat:initial">total
number of measurements     = 38</span></span><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;color:rgb(80,0,80);background-image:initial;background-repeat:initial"><br>
<span class="im">total number of
variables        = 2</span><br>
<span class="im">number of independent variables  = 1</span><br>
<span class="im">number of unit
variables         = 1</span><br>
<span class="im">number of within-cell variables  = 0</span><br>
<span class="im">number of control variables      = 0</span><br>
<span class="im">using a permutation resampling approach</span><br>
<span class="im">repeated measurement in variable 1 over 19 levels</span><br>
<span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;color:rgb(34,34,34);background-image:initial;background-repeat:initial"></span>number of repeated measurements in each level is 2
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2<span class=""> </span></span><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif"><br>
</span><span class="im"><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial">computing a parametric threshold for clustering</span><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial"><br>
<span class="im">computing statistic</span><br>
</span><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;color:rgb(34,34,34);background-image:initial;background-repeat:initial"></span>estimated time per randomization is 0.04 seconds</span><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;color:rgb(80,0,80);background-image:initial;background-repeat:initial"><br>
<span class="im">computing statistic 1000 from 1000</span><br>
<br>
<span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;color:rgb(34,34,34);background-image:initial;background-repeat:initial"></span>found 9 positive clusters in observed data</span><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif"><br>
<span style="background-image:initial;background-repeat:initial">found 13
negative clusters in observed data</span></span><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;color:rgb(80,0,80);background-image:initial;background-repeat:initial"><br>
<span class="im">computing clusters in randomization</span><br>
<span class="im">computing clusters in randomization 1000 from 1000</span><br>
<br>
<span class="im">using a cluster-based method for multiple comparison correction</span><br>
<span class="im">the returned probabilities and the thresholded mask are
corrected for multiple comparisons</span><br>
<span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;color:rgb(34,34,34);background-image:initial;background-repeat:initial"></span>the call to "ft_timelockstatistics" took
46 seconds and required the additional allocation of an estimated 0 MB</span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;color:rgb(80,0,80);background-image:initial;background-repeat:initial"><br></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;color:rgb(80,0,80);background-image:initial;background-repeat:initial"><br></span></p>

<p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial">I checked that I actually provided the good data and parameters to the
function, but I am puzzled by the resemblance (if you invert the sign) of the
results. To doublecheck, I directly compared the stat.stat field from the two
tests. Here are the results:</span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial"><br></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial"><img src="cid:ii_15607b3d4a7598ae" alt="Images intégrées 3" width="428" height="338"><br></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial"><br></span></p>

<p class="MsoNormal"><span style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial"></span><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial"></span></p>

<p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial">So basically, it is the same if you round to the 3<sup>rd</sup>
digits after the floating point. It sounds really weird to me. </span></p>

<p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial">Has someone ever noticed something similar when performing regression tests? I there any simple mathematical tricks that could explain that?</span></p><p class="MsoNormal"><br></p>

<p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial">Best regards,</span></p>

<p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial"> </span></p>

<p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-repeat:initial">Baptiste Gauthier, PhD</span></p><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Baptiste Gauthier<br>Postdoctoral Research Fellow<br><br>
INSERM-CEA Cognitive Neuroimaging unit<br>
CEA/SAC/DSV/DRM/Neurospin center<br>
Bât 145, Point Courier 156 <br>
F-91191 Gif-sur-Yvette Cedex FRANCE
<div style="display:inline"></div></div>
</div>