<div dir="ltr">
<div>Dear All</div><div><br></div><div>
<div>My question is two-fold and relates to 
<b>ft_statfun_correlationT</b> as implemented in <b>ft_timelockstatistics</b> and subsequent <b>group-level analysis</b>. Apologies for the long post- I am trying to include all the information necessary. <br></div><div><br></div>

<u><b>1) </b></u>I first want to correlate a behavioral measure (1 value
 per trial) with my timelocked data (segmented into individual trials). I
 repeat this for each subject - thus obtaining a matrix of rho [number 
of sensors*length of trial] for each subject. <br></div><div><u>Code for single subject correlation:</u><br></div><div><i>cfg = [];<br>cfg.continuous   = 'no';</i></div><div><i>cfg.latency     = [0 0.55];<br>cfg.parameter   = 'trial';<br>cfg.avgoverchan = 'no';<br>cfg.statistic        = 'ft_statfun_correlationT';<br>cfg.method           = 'montecarlo';<br>cfg.numrandomization = 1000;</i></div><div><i>cfg.design           = design_matrix;<br>cfg.ivar             = 1;</i></div><div><i> [stat] = ft_timelockstatistics(cfg, SubjectData);</i></div><div><i><br></i></div><div>Data is then stored<i> in the following structure</i></div><div>AllSubj_stat_correlationMeasureA{1,SubjectNumber} = stat;<i><br></i></div>
<div><br></div><div>My understanding is that here I don't need to correct for multiple 
comparison as I enter the results into group-level analysis - where I 
correct for multiple comparison later on? <br></div>

<div><div><br></div><div><u><b>2)</b></u> I then take the rho matrices and enter them into second-level (group-level) analysis - where <br></div><div><b>a)</b>
 I want to use a paired-samples t-test comparing the rho's from this 
correlation analysis to another (same structure just a different 
behavioral measure) to see at which timepoints and what sensors/clusters
 either is stronger or weaker than the other. I have implemented this 
using a cluster-based permutation test. <br></div><div><u>Code for clusterbased permutation test:</u><br></div><div>cfg = [];<br>cfg.channel     = {'MEG'};<br>cfg.latency     = [0.0 0.55];<br>cfg.avgovertime = 'no';<br>cfg.parameter   = 'rho';<br>cfg.method      = 'montecarlo';<br>cfg.statistic   = 'ft_statfun_depsamplesT';<br>cfg.correctm    = 'cluster';<br>cfg.clusteralpha     = 0.05;<br>cfg.clusterstatistic = 'maxsum';<br>cfg.neighbours  = neighbours; % defined as above<br>cfg.minnbchan        = 2;     <br>cfg.tail             = 0;<br>cfg.clustertail      = 0;<br>cfg.alpha       = 0.05; <br>cfg.numrandomization = 1000; <br>Nsub = 27;<br>design = zeros(2, Nsub*2);<br>design(1,:) = [1:Nsub 1:Nsub];<br>design(2,:) = [ones(1,Nsub) ones(1,Nsub)*2];<br>cfg.design = design;<br>cfg.ivar                = 2; <br>cfg.uvar                = 1; <br><br>[stat] = ft_timelockstatistics(cfg, 
AllSubj_stat_correlationMeasureA

{:}, 
AllSubj_stat_correlationMeasureB



{:})<br><br></div><div><b>b)</b> I would also like to test whether there
 is a significant correlation across subjects. My instinct is to do this
 using a one-sample t-test (see code below - not yet correcting for 
multiple comparisons but I guess I could just implement Bonferroni?). 
But ideally I would like to use a non-parametric approach that is 
equivalent to the cluster-based permutation test used in a. <br></div><div>I know that this is not possible as such (as explained by Eric here 
<a href="https://mailman.science.ru.nl/pipermail/fieldtrip/2018-August/038192.html" target="_blank">https://mailman.science.ru.nl/pipermail/fieldtrip/2018-August/038192.html</a>

) <b>but is there an equivalent I could use or what would be the appropriate test to do this? </b><br></div><div><br></div><div><u>Code for One-sample t-test:</u><br></div><div>cfg = [];<br>cfg.alpha     = 0.05;<br>cfg.tail = 0<br>cfg.parameter   = 'rho';<br>cfg.method    = 'stats';<br>cfg.statistic = 'ttest';  %test against a mean of zero<br>Nsub = 27;<br>cfg.design(1,1:Nsub)  = [ones(1,Nsub)];<br>cfg.ivar                = 1; <br>cfg.uvar                = 27; <br>[stat]= ft_timelockstatistics(cfg, 
AllSubj_stat_correlationMeasureA



{:})

</div><div><br></div><div>I'd be grateful for any guidance or pointers in the right direction about my analysis process.<div class="gmail-adL"><br></div></div><div class="gmail-adL">

</div></div><div class="gmail-adL">Best, <br></div><div class="gmail-adL"><br></div>Laura</div>