[FieldTrip] Fwd: ft_statfun_actvsblT & ft_timelockstatistics error
fosco bernasconi
fosco.bernasconi at gmail.com
Sat Jan 16 15:42:50 CET 2016
Hi all,
I would like to identify ECoG electrodes that are active during my task, by
comparing the post-stimulus activity vs. the baseline. I would like to do
this on LFP (and not on time-frequency data).
Unfortunately, I keep having the error "Inappropriate dimord for the
statistics function STATFUN_ACTVSBLT.".
My cfg.dimord = 'rpt_chan_time';
I am missing something, any suggestion?
Thanks a lot in advance!
fosco
Here my code:
datafldtrp= eeglab2fieldtrip(EEG,'preprocessing');
% define intervals:
cfg = [];
cfg.channel = {'GA1'};
cfg.toilim = [-.2 0];
dataFIC_baseline = ft_redefinetrial(cfg,datafldtrp);
cfg = [];
cfg.channel = {'GA1'};
cfg.toilim = [0.05 0.25];
dataFIC_activation = ft_redefinetrial(cfg,datafldtrp);
cfg = [];
cfg.keeptrials = 'yes';
cfg.removemean = 'no';
[timelock_baseline] = ft_timelockanalysis(cfg,dataFIC_baseline);
[timelock_activation] = ft_timelockanalysis(cfg,dataFIC_activation);
timelock_activation.time = timelock_baseline.time;
cfg = [];
ntrials = size(timelock_activation.trial,1);
design = zeros(2,2*ntrials);
design(1,1:ntrials) = 1;
design(1,ntrials+1:2*ntrials) = 2;
design(2,1:ntrials) = [1:ntrials];
design(2,ntrials+1:2*ntrials) = [1:ntrials];
cfg.design = design;
cfg.statistic = 'ft_statfun_actvsblT';
cfg.method = 'montecarlo';
cfg.numrandomization = 500;
cfg.parameter = 'trial';
cfg.ivar = 1;
cfg.tail = 0;
[stat] = ft_timelockstatistics(cfg,timelock_activation,timelock_baseline);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160116/10f810e3/attachment-0001.html>
More information about the fieldtrip
mailing list