<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hey Hweeling,<br>
<br>
It seems you're only inserting one input variable into the statistics function, i.e. "<span dir="ltr">[c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});"<br>
<br>
Could you try something along this line: ft_freqstatistics(cfg, freq1, freq2)<br>
<br>
where freq1 is the original freq data, and freq2 is a copy of freq but with the relevant values (say, in powspctrm) replaced with behavior values (ensure this behavior matrix is matched in terms of size and dimensions to the original freq values).<br>
<br>
Hope this helps,<br>
Arjen</span>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">--<br>
Donders Institute for Brain, Cognition and Behaviour<br>
Centre for Cognitive Neuroimaging<br>
Radboud University Nijmegen<br>
<br>
Email: <a href="https://mail.ru.nl/owa/redir.aspx?C=aE7VYn0S90OKCrgPeLfE1S7ZybNAtNEIa36fR052GideznKNfSHe2KSW6d9DoW6tEIOMlaBdT-s.&URL=mailto%3aa.stolk%40donders.ru.nl" target="_blank">a.stolk@donders.ru.nl</a><br>
Phone: +31(0)243 68294<br>
Web: <a href="https://mail.ru.nl/owa/redir.aspx?C=aE7VYn0S90OKCrgPeLfE1S7ZybNAtNEIa36fR052GideznKNfSHe2KSW6d9DoW6tEIOMlaBdT-s.&URL=http%3a%2f%2fwww.arjenstolk.nl" target="_blank">www.arjenstolk.nl</a></div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF796688"><font color="#000000" size="2" face="Tahoma"><b>From:</b> Hwee Ling Lee [hweeling.lee@gmail.com]<br>
<b>Sent:</b> Tuesday, February 17, 2015 10:33 AM<br>
<b>To:</b> Stolk, A. (Arjen)<br>
<b>Cc:</b> FieldTrip discussion list<br>
<b>Subject:</b> Re: [FieldTrip] calculating behavioural-power correlation<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">Dear Arjen,
<div><br>
</div>
<div>Thanks for the prompt reply. I keep getting an error message when I set up my correlation cluster statistics, and I'm not sure what I could have done wrong. Here's my script:</div>
<div><br>
</div>
<div>
<div>cfg = [];</div>
<div>cfg.layout = 'EEG1010.lay';</div>
<div>cfg.neighbours = neighbours;</div>
<div>cfg.channel = 'all';</div>
<div>cfg.latency = 'all';</div>
<div>cfg.avgovertime = 'no';</div>
<div>cfg.avgoverchan = 'no';</div>
<div>cfg.avgoverfreq = 'yes';</div>
<div>cfg.parameter = 'powspctrm';</div>
<div>cfg.method = 'montecarlo';</div>
<div>cfg.statistic = 'ft_statfun_correlationT';</div>
<div>cfg.correctm = 'cluster';</div>
<div>cfg.clusteralpha = 0.05;</div>
<div>cfg.clusterstatistics = 'maxsum';</div>
<div>cfg.minnbchan = 2;</div>
<div>cfg.tail = 0;</div>
<div>cfg.clustertail = 0;</div>
<div>cfg.alpha = 0.025;</div>
<div>cfg.numrandomization = 1000;</div>
<div>cfg.ivar = 1;</div>
<div>cfg.uvar = 1;</div>
<div><br>
</div>
<div>% design matrices</div>
<div>clear design;</div>
<div>% change in MMSE score relative to baseline</div>
<div>design(1,:) = [0.095238095<span class="" style="white-space:pre"> </span>-0.045454545<span class="" style="white-space:pre">
</span>-0.533333333<span class="" style="white-space:pre"> </span>0.238095238<span class="" style="white-space:pre">
</span>-0.157894737<span class="" style="white-space:pre"> </span>0.117647059];</div>
<div>design(2,:) = 1:6;</div>
<div>cfg.design = design;</div>
<div><br>
</div>
<div>% for delta band</div>
<div>cfg.frequency = [2 4];</div>
<div>[c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});</div>
<div>[c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:});</div>
</div>
<div><br>
</div>
<div>Here's the output from Matlab:</div>
<div><br>
</div>
<div>
<div>computing statistic over the frequency range [2.000 4.000]</div>
<div>the call to "ft_appendfreq" took 0 seconds</div>
<div>the call to "ft_selectdata" took 0 seconds</div>
<div>using "ft_statistics_montecarlo" for the statistical testing</div>
<div>using "ft_statfun_correlationT" for the single-sample statistics</div>
<div>constructing randomized design</div>
<div>total number of measurements = 6</div>
<div>total number of variables = 2</div>
<div>number of independent variables = 1</div>
<div>number of unit variables = 1</div>
<div>number of within-cell variables = 0</div>
<div>number of control variables = 0</div>
<div>using a permutation resampling approach</div>
<div>repeated measurement in variable 1 over 6 levels</div>
<div>number of repeated measurements in each level is 1 1 1 1 1 1 </div>
<div>computing a parametric threshold for clustering</div>
<div>Error using ft_statfun_correlationT (line 90)</div>
<div>Invalid specification of the design array.</div>
<div>Error using ft_statistics_montecarlo (line 254)</div>
<div>could not determine the parametric critical value</div>
<div>for clustering</div>
<div><br>
</div>
<div>Error in ft_freqstatistics (line 319)</div>
<div> [stat, cfg] = statmethod(cfg, dat, cfg.design);</div>
<div> </div>
</div>
<div>Would you please tell what I have done wrong in this case?</div>
<div><br>
</div>
<div>Thanks!</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Hweeling</div>
<div><br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 17 February 2015 at 10:18, Stolk, A. (Arjen) <span dir="ltr">
<<a href="mailto:a.stolk@donders.ru.nl" target="_blank">a.stolk@donders.ru.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left-width:1px; border-left-color:rgb(204,204,204); border-left-style:solid; padding-left:1ex">
<div>
<div style="direction:ltr; font-family:Tahoma; color:rgb(0,0,0); font-size:10pt">
Hi Hweeling,<br>
<br>
Have a look at the help of ft_statfun_correlationT, which might be the function you're looking for. This function calculates correlations between two variables (e.g. subjects' behaviors and brain activities) and converts the resulting correlation coefficients
to t-statistics. <br>
<br>
Best,<br>
arjen<br>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">--<br>
Donders Institute for Brain, Cognition and Behaviour<br>
Centre for Cognitive Neuroimaging<br>
Radboud University Nijmegen<br>
<br>
Email: <a href="https://mail.ru.nl/owa/redir.aspx?C=aE7VYn0S90OKCrgPeLfE1S7ZybNAtNEIa36fR052GideznKNfSHe2KSW6d9DoW6tEIOMlaBdT-s.&URL=mailto%3aa.stolk%40donders.ru.nl" target="_blank">a.stolk@donders.ru.nl</a><br>
Phone: +31<a href="tel:%280%29243%2068294" value="+4924368294" target="_blank">(0)243 68294</a><br>
Web: <a href="https://mail.ru.nl/owa/redir.aspx?C=aE7VYn0S90OKCrgPeLfE1S7ZybNAtNEIa36fR052GideznKNfSHe2KSW6d9DoW6tEIOMlaBdT-s.&URL=http%3a%2f%2fwww.arjenstolk.nl" target="_blank">www.arjenstolk.nl</a></div>
</div>
</div>
<div style="font-family:'Times New Roman'; color:rgb(0,0,0); font-size:16px">
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma"><b>From:</b> <a href="mailto:fieldtrip-bounces@science.ru.nl" target="_blank">
fieldtrip-bounces@science.ru.nl</a> [<a href="mailto:fieldtrip-bounces@science.ru.nl" target="_blank">fieldtrip-bounces@science.ru.nl</a>] on behalf of Hwee Ling Lee [<a href="mailto:hweeling.lee@gmail.com" target="_blank">hweeling.lee@gmail.com</a>]<br>
<b>Sent:</b> Tuesday, February 17, 2015 10:06 AM<br>
<b>To:</b> FieldTrip discussion list<br>
<b>Subject:</b> [FieldTrip] calculating behavioural-power correlation<br>
</font><br>
</div>
<div>
<div class="h5">
<div></div>
<div>
<div dir="ltr"><br clear="all">
<div>Dear all,</div>
<div><br>
</div>
<div>I read on the "walkthrough" that it is possible to calculate behavioural-power correlation across subjects. However, I was not sure what type of descriptive statistics (i.e. cfg.statistics) I should use when performing correlation cluster statistics.</div>
<div><br>
</div>
<div>Would someone please enlighten me which type of statistics I should input for cfg.statistics?</div>
<div><br>
</div>
<div>Thanks!</div>
<div><br>
</div>
<div>Best regards,</div>
<div>Hweeling</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>