[FieldTrip] correlate EEG activity and behaviour

Jason Chan jasonseehochan at gmail.com
Mon Sep 16 13:37:30 CEST 2019


Hi Everyone,



I am trying to correlate EEG activity and memory scores.  I had a look at
previous threads and while it runs, I get a “stat” full of NaNs.  I am
trying to correlate a Grand Average (AVG) with cfg.keepindividuals =
‘yes’.  Is this correct or should I run this on the individual data?



AVG =

powspctrm: [15×125×29×81 double]

               label: {125×1 cell}

               freq: [1×29 double]

               time: [1×81 double]

               dimord: 'subj_chan_freq_time'

               cfg: [1×1 struct]





The code I am using is :



cond = AVG;

%Y is the memory scores from the 12 participants

Y = [0.883; 0.925; 0.815; 0.977; 0.904; 0.867; 0.802; 0.744; 0.727; 0.685;
0.728; 0.912];

dum = cond;

dum.powspctrm = repmat(Y,[1 size(cond.powspctrm,2) size(cond.powspctrm,3)
size(cond.powspctrm,4)]);

%here Y is a vector with the behavioral measure



cfg                         = [];

cfg.channel         = {'F3','F4','FC1','FC2','F1','F2','FCz','Cz'};

cfg.avgoverchan= 'yes';

cfg.latency          = [-0.5 2.0];

cfg.freq               = [4 8];

cfg.avgoverfreq = 'yes';

cfg.avgovertime = 'no';

cfg.method          = 'montecarlo';

cfg.parameter     = 'powspctrm';

cfg.statistic          = 'ft_statfun_correlationT';

cfg.numrandomization = 1000;



cfg.design = [];

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

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



corr_stat_none_learn_P = ft_freqstatistics(cfg,cond,dum);





The results I get:



corr_stat_none_learn_P =

prob: [251×2 double]

               cirange: [251×2 double]

               mask: [251×2 logical]

               stat: [251×2 double]

               ref: [1×1×251 double]

               rho: [251×2 double]

               dimord: 'chan_freq_time'

               freq: 15.9976

               label: {'mean(F3, FC1, Cz, FC2, F4, F1, F2, FCz)'}

               time: [1×251 double]

               cfg: [1×1 struct]



The dimord does not seem to match the other variables.  Is this ok?  I only
get NaNs for the stat variable.



I am grateful for any help.



Best,

Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190916/e5ac2ea6/attachment.html>


More information about the fieldtrip mailing list