[FieldTrip] calculating behavioural-power correlation

Stolk, A. (Arjen) a.stolk at donders.ru.nl
Tue Feb 17 11:45:33 CET 2015


Hey Hweeling,

"Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency?"
> indeed

"What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect?"
> the walkthough may refer to a GLM-based statistical implementation, for which the FT implementation differs from the correlationT statfun. Namely, the former uses the behavioral measure as a regressor in a data model whereas the latter uses the behavioral measure as a datapoint series for correlation with another datapoint series (and then converts to a T value). The correlationT statfun is relatively 'new', hence not yet addressed in the walkthrough.

Yours,
arjen

________________________________
From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Hwee Ling Lee [hweeling.lee at gmail.com]
Sent: Tuesday, February 17, 2015 11:34 AM
To: FieldTrip discussion list
Subject: Re: [FieldTrip] calculating behavioural-power correlation

Dear Arjen,

Thanks for the prompt reply again!

Just to ensure that I get this right, I should create a variable for the behavioural measure such that the variable contains a powspctrm field with the behavioural information for every frequency?

What I'm confused is that in the walkthrough website, under the subsection on correlation, it is suggested to create the cfg.design with the behavioural measure that one wants to correlate. So is this information in the walkthrough website incorrect?

Cheers,
Hweeling


On 17 February 2015 at 11:23, Stolk, A. (Arjen) <a.stolk at donders.ru.nl<mailto:a.stolk at donders.ru.nl>> wrote:
Hey Hweeling,

It seems you're only inserting one input variable into the statistics function, i.e. "[c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});"

Could you try something along this line: ft_freqstatistics(cfg, freq1, freq2)

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).

Hope this helps,
Arjen

--
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen

Email:  a.stolk at donders.ru.nl<https://mail.ru.nl/owa/redir.aspx?C=aE7VYn0S90OKCrgPeLfE1S7ZybNAtNEIa36fR052GideznKNfSHe2KSW6d9DoW6tEIOMlaBdT-s.&URL=mailto%3aa.stolk%40donders.ru.nl>
Phone:  +31(0)243 68294<tel:%280%29243%2068294>
Web:    www.arjenstolk.nl<https://mail.ru.nl/owa/redir.aspx?C=aE7VYn0S90OKCrgPeLfE1S7ZybNAtNEIa36fR052GideznKNfSHe2KSW6d9DoW6tEIOMlaBdT-s.&URL=http%3a%2f%2fwww.arjenstolk.nl>
________________________________
From: Hwee Ling Lee [hweeling.lee at gmail.com<mailto:hweeling.lee at gmail.com>]
Sent: Tuesday, February 17, 2015 10:33 AM
To: Stolk, A. (Arjen)
Cc: FieldTrip discussion list
Subject: Re: [FieldTrip] calculating behavioural-power correlation

Dear Arjen,

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:

cfg = [];
cfg.layout = 'EEG1010.lay';
cfg.neighbours = neighbours;
cfg.channel = 'all';
cfg.latency = 'all';
cfg.avgovertime = 'no';
cfg.avgoverchan = 'no';
cfg.avgoverfreq = 'yes';
cfg.parameter = 'powspctrm';
cfg.method = 'montecarlo';
cfg.statistic = 'ft_statfun_correlationT';
cfg.correctm = 'cluster';
cfg.clusteralpha = 0.05;
cfg.clusterstatistics = 'maxsum';
cfg.minnbchan = 2;
cfg.tail = 0;
cfg.clustertail = 0;
cfg.alpha = 0.025;
cfg.numrandomization = 1000;
cfg.ivar = 1;
cfg.uvar = 1;

% design matrices
clear design;
% change in MMSE score relative to baseline
design(1,:) = [0.095238095<tel:%5B0.095238095> -0.045454545<tel:045454545> -0.533333333<tel:0.533333333> 0.238095238<tel:0.238095238> -0.157894737 0.117647059];
design(2,:) = 1:6;
cfg.design = design;

% for delta band
cfg.frequency = [2 4];
[c200_delta_stat] = ft_freqstatistics(cfg, sub_LF_c200{:});
[c210_delta_stat] = ft_freqstatistics(cfg, sub_HF_c210{:});

Here's the output from Matlab:

computing statistic over the frequency range [2.000 4.000]
the call to "ft_appendfreq" took 0 seconds
the call to "ft_selectdata" took 0 seconds
using "ft_statistics_montecarlo" for the statistical testing
using "ft_statfun_correlationT" for the single-sample statistics
constructing randomized design
total number of measurements     = 6
total number of variables        = 2
number of independent variables  = 1
number of unit variables         = 1
number of within-cell variables  = 0
number of control variables      = 0
using a permutation resampling approach
repeated measurement in variable 1 over 6 levels
number of repeated measurements in each level is 1 1 1 1 1 1
computing a parametric threshold for clustering
Error using ft_statfun_correlationT (line 90)
Invalid specification of the design array.
Error using ft_statistics_montecarlo (line 254)
could not determine the parametric critical value
for clustering

Error in ft_freqstatistics (line 319)
  [stat, cfg] = statmethod(cfg, dat, cfg.design);

Would you please tell what I have done wrong in this case?

Thanks!

Cheers,
Hweeling


On 17 February 2015 at 10:18, Stolk, A. (Arjen) <a.stolk at donders.ru.nl<mailto:a.stolk at donders.ru.nl>> wrote:
Hi Hweeling,

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.

Best,
arjen

--
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen

Email:  a.stolk at donders.ru.nl<https://mail.ru.nl/owa/redir.aspx?C=aE7VYn0S90OKCrgPeLfE1S7ZybNAtNEIa36fR052GideznKNfSHe2KSW6d9DoW6tEIOMlaBdT-s.&URL=mailto%3aa.stolk%40donders.ru.nl>
Phone:  +31(0)243 68294<tel:%280%29243%2068294>
Web:    www.arjenstolk.nl<https://mail.ru.nl/owa/redir.aspx?C=aE7VYn0S90OKCrgPeLfE1S7ZybNAtNEIa36fR052GideznKNfSHe2KSW6d9DoW6tEIOMlaBdT-s.&URL=http%3a%2f%2fwww.arjenstolk.nl>
________________________________
From: fieldtrip-bounces at science.ru.nl<mailto:fieldtrip-bounces at science.ru.nl> [fieldtrip-bounces at science.ru.nl<mailto:fieldtrip-bounces at science.ru.nl>] on behalf of Hwee Ling Lee [hweeling.lee at gmail.com<mailto:hweeling.lee at gmail.com>]
Sent: Tuesday, February 17, 2015 10:06 AM
To: FieldTrip discussion list
Subject: [FieldTrip] calculating behavioural-power correlation


Dear all,

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.

Would someone please enlighten me which type of statistics I should input for cfg.statistics?

Thanks!

Best regards,
Hweeling




_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150217/aa268376/attachment-0002.html>


More information about the fieldtrip mailing list