<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr">Dear Juan,<div><br></div><div>Your code looks fine to me. Indeed, also with ft_statfun_indepsamplesregrT, the behavioral vector goes into the design matrix.</div><div><br></div><div>All p-values computed with the montecarlo method correspond to one tail and, thus, you would need to correct for this one-sided test approach if you intended to do a two-sided test. Either cfg.correcttail = 'alpha' or 'prob' will achieve this, as further explained <a href="http://www.fieldtriptoolbox.org/faq/why_should_i_use_the_cfg.correcttail_option_when_using_statistics_montecarlo/">here</a>. </div><div><br></div><div>Have a great weekend,</div><div>Arjen</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 12, 2019 at 7:35 AM Juan Lei <<a href="mailto:juan.lei@hotmail.com">juan.lei@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<span>Dear Arjen,</span></div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<span><br>
</span></div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<span>if I use ft_statfun_indepsamplesregrT, are all the Parameters the same as <span style="color:rgb(33,33,33);font-size:15px;font-stretch:100%;display:inline">correlationT
method</span> ? Below are all my parameters used. Are they correct? Another question is whether I need the "<span style="font-family:Calibri,Helvetica,sans-serif;font-stretch:100%;display:inline">cfg.correcttail = 'alpha'"
for the <span style="font-family:Calibri,Helvetica,sans-serif;font-stretch:100%;display:inline">
indepsamplesregrT</span> methoed?</span></span></div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<span><br>
</span></div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<span><span> cfg=[];<br>
</span>
<div> cfg.channel = {'*'};</div>
<div> cfg.frequency = [15 35];<br>
</div>
<div> cfg.avgoverfreq ='no';</div>
<div> cfg.latency = [-0.7 0];<br>
</div>
<div> cfg.avgoverchan = 'no';</div>
<div> cfg.avgovertime = 'no';</div>
<div> cfg.parameter = 'powspctrm';</div>
<div> cfg.method = 'montecarlo';</div>
<div> cfg.alpha = 0.05;</div>
<div> cfg.numrandomization = 1000;</div>
<div> cfg.correctm = 'cluster';</div>
<div> cfg.clusteralpha = 0.05;</div>
<div> cfg.clusterstatistic = 'maxsum';</div>
<div> cfg.correcttail = 'alpha';</div>
<div> cfg.tail = 0;</div>
<div> cfg.clustertail = 0;</div>
<div> cfg.minnbchan = 2;</div>
<div> cfg.neighbours = neighbours;</div>
<div> cfg.statistic ='ft_statfun_indepsamplesregrT';</div>
<div> cfg.ivar = 1;<br>
</div>
<div> cfg.design = [];</div>
<div> cfg.design(1,:) = xa;% xa is my behavioral vector. Each subject has one behavioral value.</div>
<div> <span>freq_stat = ft_freqstatistics(cfg,GA_RI);% GA_RI is my time frequency data averaged across group but keeping individuals.</span></div>
<div><span><br>
</span></div>
<div><span><br>
</span></div>
<div><span>Best regards,</span></div>
<div><span><br>
</span></div>
<div><span>Juan Lei</span></div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</span></div>
<div id="gmail-m_-3747166903050743381appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_-3747166903050743381divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> fieldtrip <<a href="mailto:fieldtrip-bounces@science.ru.nl" target="_blank">fieldtrip-bounces@science.ru.nl</a>> on behalf of Valeriya Belyaeva <<a href="mailto:vabelyaeva94@gmail.com" target="_blank">vabelyaeva94@gmail.com</a>><br>
<b>Sent:</b> Tuesday, February 19, 2019 7:11 PM<br>
<b>To:</b> FieldTrip discussion list<br>
<b>Subject:</b> Re: [FieldTrip] Fwd: correlation with behavioural data and cluster statistics</font>
<div> </div>
</div>
<div>
<div dir="ltr">Thank you a lot, Arjen.
<div><br>
</div>
<div>Best regards,</div>
<div>Valeriya</div>
</div>
<br>
<div class="gmail-m_-3747166903050743381x_gmail_quote">
<div dir="ltr" class="gmail-m_-3747166903050743381x_gmail_attr">вт, 19 февр. 2019 г. в 18:44, Arjen Stolk <<a href="mailto:a.stolk8@gmail.com" target="_blank">a.stolk8@gmail.com</a>>:<br>
</div>
<blockquote class="gmail-m_-3747166903050743381x_gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div dir="auto">
<div dir="ltr"></div>
<div dir="ltr">Hi Valeriya,</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">That looks to be correct use of the correlationT method. The behavioral data goes into the design matrix, as you did.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Best,</div>
<div dir="ltr">Arjen</div>
<div dir="ltr"><br>
On Feb 19, 2019, at 6:35 AM, Valeriya Belyaeva <<a href="mailto:vabelyaeva94@gmail.com" target="_blank">vabelyaeva94@gmail.com</a>> wrote:<br>
<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr"><br>
<br>
<div class="gmail-m_-3747166903050743381x_gmail_quote">
<div dir="ltr" class="gmail-m_-3747166903050743381x_gmail_attr">---------- Forwarded message ---------<br>
From: <strong class="gmail-m_-3747166903050743381x_gmail_sendername" dir="auto">Valeriya Belyaeva</strong> <span dir="ltr">
<<a href="mailto:vabelyaeva94@gmail.com" target="_blank">vabelyaeva94@gmail.com</a>></span><br>
Date: ср, 13 февр. 2019 г. в 16:28<br>
Subject: correlation with behavioural data and cluster statistics<br>
To: <<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>><br>
</div>
<br>
<br>
<div dir="ltr">
<div dir="ltr">
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">
<span lang="EN-US">Dear fieldtrip developers,</span></p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">
<span lang="EN-GB">I have a question about correlation of neuronal and behavioural data. You have discussed this question here:
<span class="gmail-m_-3747166903050743381x_gmail-m_7434744200501939998m_4458023285104014310gmail-MsoHyperlink" style="color:rgb(5,99,193)">
<a href="https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.fieldtriptoolbox.org%2Ffaq%2Fhow_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables%2F&data=02%7C01%7C%7Cf5787d0a00b04a9a6a5a08d696962ca2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636861969065513175&sdata=PlfWV7rf8x9WKS373TuqhMfhfqyE0C4RNTwGnbJP54M%3D&reserved=0" style="color:rgb(5,99,193)" target="_blank">http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables/</a></span></span></p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">
<span lang="EN-GB">I have taken the code, which was given as an example and added cluster-based correction method. My goal is to perform correlation between neuronal and behavioural data and then to account for multiple comparisons with cluster statistics.
</span></p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">
<span lang="EN-GB">Could you, please, tell me, whether this script does it? </span>
</p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">
<span lang="EN-GB">Here is the script:</span></p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font face="Calibri, sans-serif"><span style="font-size:14.6667px">% example script </span></font></p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font face="Calibri, sans-serif"><span style="font-size:14.6667px">cfg = [];</span></font></p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font face="Calibri, sans-serif"><span style="font-size:14.6667px">cfg.statistic = 'ft_statfun_correlationT';</span></font></p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font face="Calibri, sans-serif"><span style="font-size:14.6667px">cfg.method = 'montecarlo';</span></font></p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font face="Calibri, sans-serif"><span style="font-size:14.6667px">cfg.numrandomization = 1000;</span></font></p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font face="Calibri, sans-serif"><span style="font-size:14.6667px">cfg.correctm = 'cluster';</span></font></p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font face="Calibri, sans-serif"><span style="font-size:14.6667px"><br>
</span></font></p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font face="Calibri, sans-serif"><span style="font-size:14.6667px">cfg.clusteralpha = 0.025;</span></font></p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font face="Calibri, sans-serif"><span style="font-size:14.6667px">cfg_neighb.method = 'triangulation';</span></font></p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font face="Calibri, sans-serif"><span style="font-size:14.6667px">cfg_neighb.layout = 'acticap_62'; </span></font></p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font face="Calibri, sans-serif"><span style="font-size:14.6667px">cfg.neighbours = ft_prepare_neighbours(cfg_neighb, data_brain{:});</span></font></p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font face="Calibri, sans-serif"><span style="font-size:14.6667px"><br>
</span></font></p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font face="Calibri, sans-serif"><span style="font-size:14.6667px">n1 = 42; % n1 is the number of subjects</span></font></p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font face="Calibri, sans-serif"><span style="font-size:14.6667px">design(1,1:n1) = behav_data(:,1); % mean reaction time by subject</span></font></p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font face="Calibri, sans-serif"><span style="font-size:14.6667px">cfg.design = design;</span></font></p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font face="Calibri, sans-serif"><span style="font-size:14.6667px">cfg.ivar = 1;</span></font></p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font face="Calibri, sans-serif"><span lang="EN-GB" style="font-size:14.6667px"></span></font></p>
<p class="gmail-m_-3747166903050743381x_MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%"><font face="Calibri, sans-serif"><span style="font-size:14.6667px">stat = ft_freqstatistics(cfg, data_brain{:});</span></font></p>
<div><br>
</div>
<div>Thank you a lot in advance! </div>
-- <br>
<div dir="ltr" class="gmail-m_-3747166903050743381x_gmail-m_7434744200501939998m_4458023285104014310gmail_signature">
<div dir="ltr">Best regards,
<div>Valeriya Belyaeva </div>
<div>HSE, Cognitive science and technologies </div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail-m_-3747166903050743381x_gmail-m_7434744200501939998gmail_signature">
<div dir="ltr">Best regards,
<div>Valeriya Belyaeva </div>
<div>HSE, Cognitive science and technologies </div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<blockquote type="cite">
<div dir="ltr"><span>_______________________________________________</span><br>
<span>fieldtrip mailing list</span><br>
<span><a href="https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=02%7C01%7C%7Cf5787d0a00b04a9a6a5a08d696962ca2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636861969065523187&sdata=r3MoHOSBgBaGepkioATjwMBN5Pw0LKaFlTLMns7O4JU%3D&reserved=0" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></span><br>
<span><a href="https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=02%7C01%7C%7Cf5787d0a00b04a9a6a5a08d696962ca2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636861969065533192&sdata=WgU%2FWOboFOmczUC7XlDwB4xBym2CpNKJTKg4%2FSuEfD8%3D&reserved=0" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a></span><br>
</div>
</blockquote>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=02%7C01%7C%7Cf5787d0a00b04a9a6a5a08d696962ca2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636861969065543204&sdata=y%2BPI%2FkTrU8qHK724FjFsqmip%2BQX6vPlj5yHEf7YZorc%3D&reserved=0" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=02%7C01%7C%7Cf5787d0a00b04a9a6a5a08d696962ca2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636861969065553209&sdata=nlElRbo3ZfgypPKhwVkHm7bfbJVnYlOVZWkvJzo%2BkDg%3D&reserved=0" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail-m_-3747166903050743381x_gmail_signature">
<div dir="ltr">Best regards,
<div>Valeriya Belyaeva </div>
<div>HSE, Cognitive science and technologies </div>
<div><br>
</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>