[FieldTrip] Using ft_statfun_actvsblt for time domain data

David Prete preted at mcmaster.ca
Thu Aug 1 15:56:15 CEST 2019


Dear Community,

I am trying to test my baseline condition for ERP in the time domain using
ft_statfun_actvsblt but I keep getting the error.
"Inappropriate dimord for the statistics function FT_STATFUN_ACTVSBLT"

Looking through the code for the function I found this snippet.
switch cfg.dimord
case 'chan_freq_time'
nchan = cfg.dim(1);
nfreq = cfg.dim(2);
ntime = cfg.dim(3);
[nsmpls,nrepl] = size(dat);
otherwise
ft_error('Inappropriate dimord for the statistics function
FT_STATFUN_ACTVSBLT.');
end
Does this mean this function is inappropriate to use for time-domain data?
If so, could anyone suggest an alternative I might use?  Below is the code
I have been using.
      cfg = [];
        cfg.method = 'montecarlo';
        cfg.statistic = 'actvsblt';
        cfg.correctm = 'cluster';
        cfg.clusteralpha = 0.05;
        cfg.clusterstatistic = 'maxsum';
        cfg.minnbchan = 2;
        cfg_neighb        = [];
        cfg_neighb.method = 'distance';
        cfg.neighbours        = ft_prepare_neighbours(cfg_neighb,
allData_activation{jj,1});
        cfg.tail = 0;
        cfg.clustertail = 0;
        cfg.alpha = 0.025;
        cfg.numrandomization = 1000;

        subj = size(allData_activation,1);
        design = zeros(2,2*subj);
        for i = 1:subj
        design(1,i) = i;
        end
        for i = 1:subj
        design(1,subj+i) = i;
        end
        design(2,1:subj)        = 1;
        design(2,subj+1:2*subj) = 2;

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

        stat{jj,1} = ft_timelockstatistics(cfg, allData_activation{:,jj},
 allData_baseline{:,jj});
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190801/f5877dcb/attachment-0002.html>


More information about the fieldtrip mailing list