[FieldTrip] calculating behavioural-power correlation

Frédéric Roux f.roux at bcbl.eu
Tue Feb 17 18:03:09 CET 2015


Dear Arjen, dear Hweeling,

I would be interested in trying this method as well.

May I ask you how to specify the design matrix?

For instance if I want to measure the correlation between a TFR-matrix
and some behavioral measure (Y) across participants would something like
this make sense:

AVG =
     powspctrm:[4-D double]
     label:{186x1 cell}
     freq:[1x49 double]
     time:[1x121 double]
     dimord: 'subj_chan_freq_time'
     cfg:[1x1 stuct]


dum = AVG;
dum.powspctrm = repmat(Y,[1 size(AVG.powspctrm,2) size(AVG.powspctrm,3) size(AVG.powspctrm,4)]);
%here Y is a vector with the behavioral measure

cfg = [];
cfg.method = 'montecarlo';
cfg.parameter = 'powspctrm';
cfg.statistic = 'ft_statfun_correlationT';
etc

cfg.design = [];
cfg.design(1,:) = [ones(1,lenght(Y)) 2*ones(1,length(Y))];
cfg.design(2,:) = [1:length(Y) 1:length(Y)];

freq_stat = ft_freqstatistica(cfg,AVG,dum);


This, however, results in extremely long computing times, which makes me 
doubt that this is the correct way.

Best,

Fred

Frédéric Roux

----- Original Message -----
From: "Hwee Ling Lee" <hweeling.lee at gmail.com>
To: "arjen stolk" <arjen.stolk at donders.ru.nl>
Cc: "FieldTrip discussion list" <fieldtrip at science.ru.nl>
Sent: Tuesday, February 17, 2015 5:39:29 PM
Subject: Re: [FieldTrip] calculating behavioural-power correlation



Thanks! One last question, just to be sure, what is the reference for this correlation method? I tried to search for your publications but not sure which one to cite. 


Cheers, 
Hweeling 


On 17 February 2015 at 16:44, arjen stolk < a.stolk8 at gmail.com > wrote: 





Yes it does. ;) 
Arjen 


-------- Oorspronkelijk bericht -------- 
Van: Hwee Ling Lee < hweeling.lee at gmail.com > 
Datum: 
Aan: "Stolk, A. (Arjen)" < a.stolk at donders.ru.nl > 
Cc: FieldTrip discussion list < fieldtrip at science.ru.nl > 
Onderwerp: Re: [FieldTrip] calculating behavioural-power correlation 



Dear Arjen, 


Thanks! It works well now. 


I plotted the results using ft_clusterplot, and it only shows the significant clusters that show significant correlation of power and behavioural measure, right? Or is there a better way I can display the results? 


Thanks again. 


Cheers, 
Hweeling 






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




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 > 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 
Phone: +31 (0)243 68294 
Web: www.arjenstolk.nl 


From: Hwee Ling Lee [ 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 -0. 045454545 - 0.533333333 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 > 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 
Phone: +31 (0)243 68294 
Web: www.arjenstolk.nl 


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 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 
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip 









-- 


================================================= 
Dr. rer. nat. Lee, Hwee Ling 
Postdoc 
German Center for Neurodegenerative Diseases (DZNE) Bonn 

Email 1: hwee-ling.lee<at> dzne.de 
Email 2: hweeling.lee<at> gmail.com 


https://sites.google.com/site/hweelinglee/home 

Correspondence Address: 
Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany 
================================================= 




-- 


================================================= 
Dr. rer. nat. Lee, Hwee Ling 
Postdoc 
German Center for Neurodegenerative Diseases (DZNE) Bonn 

Email 1: hwee-ling.lee<at> dzne.de 
Email 2: hweeling.lee<at> gmail.com 


https://sites.google.com/site/hweelinglee/home 

Correspondence Address: 
Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany 
================================================= 

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




More information about the fieldtrip mailing list