<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Iris,<div>Thank you for pointing that out. Let's see whether I'm able to help you out:</div><div><br></div><div>1.      When does one need to do the grandaverage?<br></div><div>Use ft_timelockgrandaverage function when you want to compute the grand average across participants and conditions. You decide when you want to compute this, there's no strict order. In the tutorials, as you saw, this is done <a href="http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/#reading-in-preprocessing-timelockanalysis-planar-gradient-and-grandaveraging">http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/#reading-in-preprocessing-timelockanalysis-planar-gradient-and-grandaveraging</a> and <a href="http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics/#reading-in-preprocessed-and-time-locked-data-in-planar-gradient-format-and-grand-averaged-data">http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics/#reading-in-preprocessed-and-time-locked-data-in-planar-gradient-format-and-grand-averaged-data</a></div><div><br></div><div>2.      If the grandaverage is done after the permutation analysis, what do we write in the neighbours’ structure? The output from ft_timelockanalysis (i.e. allsubjFC)?<br></div><div>You can compute the neighbours structure before the ft_*grandaverage (<a href="http://www.fieldtriptoolbox.org/faq/how_does_ft_prepare_neighbours_work/">http://www.fieldtriptoolbox.org/faq/how_does_ft_prepare_neighbours_work/</a>). In the tutorial data, as all participants were recorded in MEG (same helmet) and the same coils were consistently recorded in all participants, you can compute the neighbour structure in one of your subjects or in the grand average. You can also use templates (<a href="http://www.fieldtriptoolbox.org/template/neighbours/">http://www.fieldtriptoolbox.org/template/neighbours/</a>). </div><div><br></div><div>Critically, if you're dealing with your own EEG data, you have to make sure all your subjects have the same amount of electrodes to compute the neighbour structure before using ft_*statistics.m. In EEG, often you encounter  participants with nonusable electrodes (they broke/didn't contact scalp) and you either reject them or interpolate them (<a href="http://www.fieldtriptoolbox.org/workshop/madrid2019/tutorial_cleaning/#interpolating-bad-channels">http://www.fieldtriptoolbox.org/workshop/madrid2019/tutorial_cleaning/#interpolating-bad-channels</a>).</div><div><br></div><div>I hope that helps!</div><div><br></div><div>Diego</div><div><br></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 15 Mar 2019 at 12:35, MILÁN MAILLO, IRIS <<a href="mailto:iris.milan@upf.edu">iris.milan@upf.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br><code><span class="gmail-m_-5170094086308905982gmail-c1"><font face="arial,helvetica,sans-serif">

</font></span></code><p class="MsoNormal" style="margin-bottom:12pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman",serif" lang="EN-GB">Hi everyone,</span></p>

<p class="MsoNormal" style="margin-bottom:12pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman",serif" lang="EN-GB">I am a
newbie in Fieldtrip and I'm trying to do a cluster-based permutation test
within subjects. I am looking at these two tutorials:<br>
<a href="http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/" target="_blank">http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/</a><br>
<a href="http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics/" target="_blank">http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics/</a></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman",serif" lang="EN-GB">In the two
of them, it is said that the steps to follow are (in order):
ft_timelockanalysis, ft_timelockgrandaverage, and ft_timelockstatistics.</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman",serif" lang="EN-GB">However, in
<a href="http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/" target="_blank">http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/</a> they
seem to perform ft_timelockanalysis followed by ft_timelockstatistics and after
that, they do ft_timelockgrandaverage (this is not what is proposed in the
other tutorial). I don't know if this makes a big difference or not, but inconsistencies
across tutorials are confusing. Moreover, in the within-subjects part (<a href="http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/" target="_blank">http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/</a>),
it is said that the configuration in neighbours creation is the same as in the
between-trials:</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman",serif" lang="EN-GB"> </span></p>

<p class="MsoNormal" style="margin-bottom:12pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman",serif" lang="EN-GB">“cfg.neighbours
= neighbours;<span>  </span>% same as defined for the
between-trials experiment”</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman",serif" lang="EN-GB">Nevertheless,
in the between-trials experiment, they use the GA_FC to do the neighbours
structure, but in the within-subjects trial it is not possible to do so,
because the grandaverage is only done after the permutation test. So what we
need to do?</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman",serif" lang="EN-GB">In sum, my
questions are:</span></p>

<p class="gmail-m_-5170094086308905982gmail-MsoListParagraphCxSpFirst" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman",serif" lang="EN-GB"><span>1.<span style="font:7pt "Times New Roman"">     
</span></span></span><span style="font-size:12pt;font-family:"Times New Roman",serif" lang="EN-GB">When does one need to do the grandaverage?</span></p>

<p class="gmail-m_-5170094086308905982gmail-MsoListParagraphCxSpLast" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman",serif" lang="EN-GB"><span>2.<span style="font:7pt "Times New Roman"">     
</span></span></span><span style="font-size:12pt;font-family:"Times New Roman",serif" lang="EN-GB">If the grandaverage is done after the permutation
analysis, what do we write in the neighbours’ structure? The output from
ft_timelockanalysis (i.e. allsubjFC)?</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman",serif" lang="EN-GB"> </span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman",serif" lang="EN-GB">Thanks in
advance,</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman",serif" lang="EN-GB"> </span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman",serif" lang="EN-GB">Iris</span></p>

<div>-- <br><div dir="ltr" class="gmail-m_-5170094086308905982gmail_signature"><div dir="ltr"><div><div dir="ltr"><span><b>Iris Milán Maillo</b><br>
 <br>
 PhD Student<br><a href="https://www.upf.edu/web/spb" target="_blank">Speech Production and Bilingualism (SPB)</a><br>
 <a href="http://cbc.upf.edu/cbc.upf.edu/" target="_blank">Center for Brain and Cognition (CBC)</a><br>
 <br> 
 Carrer de Ramon Trias Fargas, 25-27, 08005 Barcelona | Edifici Merce Rodoreda, (room 24.311)<br>
 </span></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div></div></div></div></div></div>