<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'><font size="3">Hi Stephen,</font><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 12pt;"><br></div><div><font size="3">You can take a look to ft_statfun_diff.m function: it's a good example to start with.</font><br><br>You might also want to take a look here:<br>http://fieldtrip.fcdonders.nl/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests</div><div><br></div><div>Regarding the <span style="font-size: 16px;">abs(ttest(Ia,Ib))-abs(ttest(IIa,IIb)), I'm not sure what the output of your statistic would mean. </span></div><div><span style="font-size: 16px;"><br></span></div><div><span style="font-size: 16px;">best,</span></div><div><span style="font-size: 16px;"><br></span></div><div><span style="font-size: 16px;">Diego</span></div><div><br><hr id="zwchr" style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 12pt;"><blockquote style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 12pt; border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><b>From: </b>"Stephen Politzer-Ahles" <spa268@nyu.edu><br><b>To: </b>fieldtrip@donders.ru.nl<br><b>Sent: </b>Monday, 2 June, 2014 9:39:57 AM<br><b>Subject: </b>[FieldTrip] Defining a custom statfun for cluster statistics<br><br><div dir="ltr">Hello all,<div><br></div><div>Are there any examples for defining a new statfun to use in ft_timelockstatistics? I thought there were, but can't currently find them on the wiki.</div><div><br></div><div>
I am testing a 2x2 interaction (let's call the conditions Ia, Ib, IIa, and IIb), and I an only interested in a certain kind of interaction, one where abs(Ia-Ib) is large and abs(IIa-IIb) is small (i.e., an effect of the second factor at just one level of the first factor, and not the other level). So rather than using F as my test statistic for defining clusters, I would like to use something like abs(ttest(Ia,Ib))-abs(ttest(IIa,IIb)). I just don't know how to define the function to do this; if anyone could point me in the right direction I would greatly appreciate it.</div>
<div><br></div><div>Thanks!</div><div>Steve<br clear="all"><div><div dir="ltr"><div><br><br></div>Stephen Politzer-Ahles<br>New York University, Abu Dhabi<br>Neuroscience of Language Lab<br><a href="http://www.nyu.edu/projects/politzer-ahles/" target="_blank">http://www.nyu.edu/projects/politzer-ahles/</a><br>
</div></div>
</div></div>
<br>_______________________________________________<br>fieldtrip mailing list<br>fieldtrip@donders.ru.nl<br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote><br><br><br><font size="3">-- </font><br><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 12pt;"><span name="x"></span>PhD Student<br>Neuronal Oscillations Group<br>Donders Institute for Brain, Cognition and Behaviour <br>Centre for Cognitive Neuroimaging<br>Radboud University Nijmegen <br>NL-6525 EN Nijmegen<br>The Netherlands<br>http://www.ru.nl/people/donders/lozano-soldevilla-d/<span name="x"></span><br></div></div></div></body></html>