[FieldTrip] Help on ft_statfun_correlationT

Arjen Stolk a.stolk8 at gmail.com
Mon Feb 15 19:57:51 CET 2016


Hi Ronny,

Can you check whether this page answers your question? It provides a
theoretical background, and a couple of examples:

http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables

Best,
Arjen

2016-02-14 22:58 GMT-08:00 Ronny Ibrahim <ronny.ibrahim at mq.edu.au>:

> Dear Fellow fieldtrip users,
> I hope that you don't mind me emailing you directly enquiring about the
> procedures of using ft_statfun_correlationT. I have been reading the
> fieldtrip forum but seems to still don't quite understand fully on how to
> get the function to run properly. I currently have power spectrum values
> (2047 frequency points) from 15 electrode channels (which will give a
> powspctrm size of 15x2047) and I would like to see whether any of the
> frequency bands (alpha, delta, beta, gamma values) do correlate to
> behavioral measures such as distress, etc. As it had suggested in the forum
> http://mailman.science.ru.nl/pipermail/fieldtrip/2015-February/008950.html
> I should create a dummy variable with equal size to powspctrm and fill
> them with my behavioural value (eg 'distress' lets call it D which is
> essentially D*ones(15,2047)).
> I have created a design matrix as follow :
> cfg.design           = [1*ones(1,36) 2*ones(1,36); 1:36 1:36];
>
> as I have 36 replications
>
> Here is the script that I have put together.
> %% Conditions
> %C1 - actual powerspectrum values of 15 electrodes
> %C2 - distress values
> C_1 = {TIN1{2} TIN1{4} TIN1{5} TIN1{6} TIN1{7} TIN1{8} TIN1{9} TIN1{10}
> TIN1{11} TIN2{2} TIN2{4} TIN2{5} TIN2{6} TIN2{7} TIN2{8} TIN2{9} TIN2{10}
> TIN2{11} TIN3{2} TIN3{4} TIN3{5} TIN3{6} TIN3{7} TIN3{8} TIN3{9} TIN3{10}
> TIN3{11} TIN4{2} TIN4{4} TIN4{5} TIN4{6} TIN4{7} TIN4{8} TIN4{9} TIN4{10}
> TIN4{11}};
> C_2 = {TFI1{1} TFI1{2} TFI1{3} TFI1{4} TFI1{5} TFI1{6} TFI1{7} TFI1{8}
> TFI1{9}  TFI2{1} TFI2{2} TFI2{3} TFI2{4} TFI2{5} TFI2{6} TFI2{7} TFI2{8}
> TFI2{9} TFI3{1} TFI3{2} TFI1{3} TFI3{4} TFI3{5} TFI3{6} TFI3{7} TFI3{8}
> TFI3{9} TFI4{1} TFI4{2} TFI4{3} TFI4{4} TFI4{5} TFI4{6} TFI4{7} TFI4{8}
> TFI4{9}};
>
> cfg = [];
> cfg.layout = 'MEG.lay';
> lay = ft_prepare_layout(cfg);
>
>
> %% Performing cluster statistics
> cfg                  = [];
> cfg.frequency        = [8 12];
> cfg.channel          = 'all';
> cfg.avgovertime      = 'no';
> cfg.avgoverfreq      = 'yes';
> cfg.avgoverchan      = 'no';
> cfg.statistic        = 'ft_statfun_correlationT';
> cfg.numrandomization = 1000;
> cfg.correctm         = 'cluster';
> cfg.method           = 'montecarlo';
> cfg.clusteralpha     = 0.05;
> cfg.clusterstatistic = 'maxsum';
> cfg.minnbchan        = 1;
> cfg.tail             = 0;
> cfg.clustertail      = 0;
> cfg.alpha            = 0.05;
> cfg_neighb.layout    = lay;
> cfg_neighb.method    = 'triangulation';
> cfg.neighbours       = ft_prepare_neighbours(cfg_neighb);
> cfg.uvar             = 1;
> cfg.ivar             = 1;
> cfg.computecritval = 'yes';
> cfg.design           = [1*ones(1,36) 2*ones(1,36); 1:36 1:36];
> stat                 = ft_freqstatistics(cfg, C_1{:}, C_2{:});
> %% Plotting significant clusters
> cfg                  = [];
> cfg.alpha            = 0.05;
> cfg.parameter        = 'stat';
> cfg.layout           =lay;
> ft_clusterplot(cfg, stat);
> I would like to thank you guys for your kind help and assistance.
>
> Kind Regards,
>
> Ronny
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160215/8bad4047/attachment-0002.html>


More information about the fieldtrip mailing list