<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body style="background-color: rgb(255, 255, 255); color: rgb(0,
0, 0);" bgcolor="#FFFFFF" text="#000000">Dear all,<br>
I don't want to hijack the discussion but I have a related problem to
the situation Lars and Julian described (just that my actual data is
n=1).<br>
<br>
I have a single time series that I derive from thousands of trials (a
rather
complex measure requiring many samples) and a large number of surrogate
time series I created to perform statistics. I estimate power at
different frequencies in both the actual and surrogate data using
mtmfft. Now I would like to test for power differences between actual
and surrogate data.<br>
<br>
Seems to me this is equivalent to a one-sample t-test in which you test
the
surrogate data against a different value for each frequency (or in Lars'
case: test your data against an array of zeros). <br>
<br>
I tried to use indepsamplesT and do a cluster permutation test with my
actual
time series as one condition and the 1000 surrogate time series as the
other condition, but it does not execute properly. The reason is the way
variance is calculated, which leads to NaNs (due to division / 0) for
the single-sample condition. Using Matlab's var function instead
(ft_statfun_indepsamplesT, line 92 vs. 94) yields 0 as the variance for
that condition and the end result seems to be correct (at least it finds
the clusters I expected to find). <br>
<br>
Or is there a statistical problem with that solution? <br>
<br>
Thanks and all the best,<br>
Jens<br>
<br>
<br>
<br>
<span>Lars Costers wrote on 02/05/2019 15:42:</span><br>
<blockquote type="cite" cite="mid:04674DCF-D1DA-4F11-86D3-CABB1FE724A3@gmail.com" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break:
after-white-space;">
Hi, <br class="">
<br class="">
Thanks for your suggestion Julian but I¿m afraid that your approach is
not applicable for my data/hypotheses...<br class="">
<br class="">
I¿m wondering whether I could generate zero data and use that in
Fieldtrip's dependent t-test (so cfg.statistics = ¿depsamplesT¿)
together with my real data in my permutations. I think this will (in
theory) be the same as doing a one-sample t-test and flipping the sign
of subjects because the real data ("condition 1") and zero data
("condition 2") will be randomly shuffled within subjects. So for some
subjects 'data - 0¿ (equal to multiplying by 1) will be tested and for
other subjects it will be ¿0 - data¿ ( equal to multiplying by -1)).
<div class=""><br class=""></div>
<div class="">In Nichols & Holmes (2001, <a href="https://www.fil.ion.ucl.ac.uk/spm/doc/papers/NicholsHolmes.pdf" class="" moz-do-not-send="true">https://www.fil.ion.ucl.ac.uk/spm/doc/papers/NicholsHolmes.pdf</a>)
they state the following for testing H0 = distribution centred to
zero: <div class=""><div class=""><div class=""><div class=""><blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px;" class="">We
consider subject labels of ¿+1¿ and ¿-1¿ indicating an unflipped or
flipped sign of the data. Under the null hypothesis, we have
data symmetric about zero, and hence for a particular subject the sign
of the observed data can be flipped without altering its
distribution. With exchangeable subjects, we can flip the signs of any
or all subjects¿ data and the joint distribution of all of the data will
remain unchanged. </blockquote><blockquote style="margin: 0px 0px 0px
40px; border: none; padding: 0px;" class=""><br class=""></blockquote>Therefore,
I think this can be done, but I'm not 100% sure.. </div><div class=""><br class="">Does anybody have advice on this matter? <br class=""><br class="">Best,<br class="">Lars<br class=""><br class=""><blockquote type="cite" class="">On 2 May 2019, at 12:31, Julian Keil <<a href="mailto:julian.keil@gmail.com" class="" moz-do-not-send="true">julian.keil@gmail.com</a>>
wrote:<br class=""><br class="">Hi Lars,<br class=""><br class="">we
recently faced a similar problem (see here: <a href="https://www.nature.com/articles/s41598-019-42380-x" class="" moz-do-not-send="true">https://www.nature.com/articles/s41598-019-42380-x</a>).
Our solution was to create ¿dummy¿ data based on the actual data and
use these in the comparison.<br class="">In short, this relates to Eric
Maris¿ statement about the null hypothesis: In our case, the H0 was ¿the
regression weights are independent of the stimulus category¿, so we
test our empirically found regression weights against random regression
weights. Please note that we don¿t have a formal proof that his is a
valid approach.<br class=""><br class="">Unfortunately, I don¿t think
this is directly applicable to your situation, as it sounds like you
only have one category, but maybe there is a way for you to come up with
dummy data? <br class="">Again, please note that there might be
problems with our approach we didn¿t consider.<br class=""><br class="">Best,<br class=""><br class="">Julian<br class=""><br class=""><br class=""><blockquote type="cite" class="">Am 02.05.2019 um 12:05 schrieb Lars Costers
<a class="moz-txt-link-rfc2396E" href="mailto:larscosters@gmail.com"><larscosters@gmail.com></a>:<br class=""><br class="">Hi all,<br class=""><br class="">I was wondering
whether there are any one-sample
permutation statistics to test for a difference from zero implemented in
Fieldtrip, ideally to work with monte-carlo permutations? Didn¿t find
any standard of 'statfun¿ options in the documentation.<br class=""><br class="">My goal is to do maxstat correction on ERF MEG data over voxel
space.<br class="">cfg.latency = [-0.2 0.8];<br class="">cfg.parameter =
'avg';<br class="">cfg.method = 'montecarlo';<br class="">cfg.numrandomization
= 2000;<br class="">cfg.correctm = 'max'; % MaxStat correction<br class="">cfg.design = ones(1,nsub);<br class="">cfg.ivar = 1; %
independent variable<br class="">cfg.statistic = ???;<br class="">[stat]
= ft_timelockstatistics (cfg, timelock{:,1});<br class=""><br class=""> I
read the discussions about one-sample cluster-based permutation tests
(e.g. <a class="moz-txt-link-freetext" href="https://mailman.science.ru.nl/pipermail/fieldtrip/2018-August/012314.html">https://mailman.science.ru.nl/pipermail/fieldtrip/2018-August/012314.html</a>).
However, for me it's not possible to permute the baseline and post
stimulus condition because I have expectation reactions in the
baseline. <br class="">Anybody could suggest me how I could validly test
whether my ERF is signficantly different from zero at every time-frame
and electrode? <br class=""><br class="">Thanks, <br class=""><br class="">Lars<br class="">_______________________________________________<br class="">fieldtrip mailing list<br class=""><a class="moz-txt-link-freetext" href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class=""><a class="moz-txt-link-freetext" href="https://doi.org/10.1371/journal.pcbi.1002202">https://doi.org/10.1371/journal.pcbi.1002202</a><br class=""></blockquote><br class="">_______________________________________________<br class="">fieldtrip
mailing list<br class=""><a class="moz-txt-link-freetext" href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class=""><a class="moz-txt-link-freetext" href="https://doi.org/10.1371/journal.pcbi.1002202">https://doi.org/10.1371/journal.pcbi.1002202</a><br class=""></blockquote><br class=""></div></div></div></div></div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
fieldtrip mailing list
<a class="moz-txt-link-freetext" href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a>
<a class="moz-txt-link-freetext" href="https://doi.org/10.1371/journal.pcbi.1002202">https://doi.org/10.1371/journal.pcbi.1002202</a>
</pre></blockquote>
<br>
</body></html>