[FieldTrip] TFR mask stats question; Baselined vs unbaselined statistics question

Max Cantor Max.Cantor at Colorado.EDU
Fri Apr 8 23:02:17 CEST 2016

Hi fieldtrippers,

I have two unrelated stats questions, but I figured I'd post them together:

1. I've run within subjects permutation statistics testing the difference
between an anomaly and control condition for three different language
conditions; preposition, morphosyntax, and semantics. The code is nearly
identical for both my ERPs and TFRs, except that when I plot my ERPs with
cfg.maskparameter = 'mask', cfg.parameter = 'stat', and cfg.maskalpha =
0.025, it seems to multiplot just fine, whereas when I try to do the same
for the TFRs, my multiplotted plots are blank, but when I comment out the
mask, the stat plots are fine. I'll attach the code, but is there something
I'm doing obviously wrong? Also, am I correct that my maskalpha should
correspond to my alpha, and not my cluster alpha?

This is the TFR code, but the ERP code is the exact same except for with
timelocked data as the input and ft_timelockstatistics as the function.

cfg = [];
cfg.method = 'montecarlo';
cfg.statistic = 'depsamplesT';
cfg.correctm = 'cluster';
cfg.clusteralpha = 0.05;
cfg.clusterstatistic = 'maxsum';
cfg.minnbchan = 2;
cfg.neighbours = neighbours;
cfg.tail = 0;
cfg.clustertail = 0;
cfg.alpha = 0.025;
cfg.numrandomization = 1000;

nsubj = length(tot_tfr2_bl{1});
design = zeros(2,2*nsubj);
for i = 1:nsubj
  design(1,i) = i;
for i = 1:nsubj
  design(1,nsubj+i) = i;
design(2,1:nsubj)        = 1;
design(2,nsubj+1:2*nsubj) = 2;

cfg.design = design;
cfg.uvar  = 1;
cfg.ivar  = 2;

% Anomaly vs Control
stat_tfr{1} = ft_freqstatistics(cfg, tot_tfr2_bl{1}{:}, tot_tfr2_bl{2}{:});
% Preposition
stat_tfr{2} = ft_freqstatistics(cfg, tot_tfr2_bl{3}{:}, tot_tfr2_bl{4}{:});
% Semantics
stat_tfr{3} = ft_freqstatistics(cfg, tot_tfr2_bl{5}{:}, tot_tfr2_bl{6}{:});
% Morphosyntax

This is the plotting code. Again, it is virtually the same for the ERPs
except the non-stats configurations would be what makes sense for ERPs.

% Anomaly vs Control TFR stats multiplot

cfg              = [];
cfg.xlim         = [-0.2 1];
cfg.zlim         = [-3 3]; % proportion from baseline
cfg.layout       = [max_dir '/quickcap64.mat'];
cfg.maskparameter = 'mask';
cfg.parameter   = 'stat';
cfg.maskalpha   = 0.025;

ft_multiplotTFR(cfg, stat_tfr{1}); title('Preposition');
ft_multiplotTFR(cfg, stat_tfr{3}); title('Semantic');
ft_multiplotTFR(cfg, stat_tfr{5}); title('Morphosyntactic');

2. The second question is about analyzing baselined vs unbaselined data.
I've seen in the tutorials that there is a somewhat different method for
analyzing trial vs baseline period. However, what I've done instead (for
both ERP and TFR), is use the same within-subjects statistics as with
anomaly vs control, except with the inputs being baselined vs unbaselined
ERPs or TFRs, e.g. Baselined Preposition Anomaly vs Unbaselined Preposition
Anomaly, etc. I understand that the proposed method and my method are not
testing the same thing exactly, but is this a reasonable way of testing the
effect of the baselining anyway?



Max Cantor
Graduate Student
Cognitive Neuroscience of Language Lab
University of Colorado Boulder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160408/4408b0be/attachment-0001.html>

More information about the fieldtrip mailing list