[FieldTrip] Stats matrix incomplete - cluster-based permutation test
Schoffelen, J.M. (Jan Mathijs)
jan.schoffelen at donders.ru.nl
Thu Dec 10 20:36:45 CET 2015
Hi Anne,
I agree with Nick, some more information would be helpful. At this stage my wild guess (assuming that you did not constrain your ‘search space’, using cfg.channel and cfg.latency before calling ft_timelockstatistics) would be that there’s a major discrepancy in the descriptive dimensions of your data (i.e. the ‘labels’ and the time points) across the input arguments. FieldTrip does an explicit check on the labels and time points, it only proceeds to do calculations on the channels and time points that are present in each and every input argument. With respect to time points: this could even mean that numerical inaccuracies are the showstopper here. These inaccuracies could be easily introduced when e.g. downsampling.
Best,
Jan-Mathijs
On Dec 10, 2015, at 8:13 PM, Nicholas A. Peatfield <nick.peatfield at gmail.com<mailto:nick.peatfield at gmail.com>> wrote:
Hi Anne,
To get an answer/suggestion you should provide the part of your script detailing your cfg inputs.
Cheers,
Nick
On 10 December 2015 at 09:14, Anne Mickan <amickan1990 at gmail.com<mailto:amickan1990 at gmail.com>> wrote:
Dear all,
I'm just starting to work on a cluster-based permutation test script based on the tutorial for within-subject designs on the fieldtrip website. I ran into an issue when computing the [stat] matrix. I used the code as it was on the website:
[stat] = ft_timelockstatistics(cfg, Correct{:}, Incorrect{:});
with the Correct and Incorrect matrices looking as follows:
Correct{1}
avg: [34x600 double]
time: [1x600 double]
fsample: '500'
label: {34x1 cell}
dimord: 'chan_time'
dof: [34x600 double]
var: [34x600 double]
The function runs without problems, i.e I don't get any error messages. However, the result seems incomplete.
stat =
prob: [25x1 double]
posclusters: []
posclusterslabelmat: [25x1 double]
posdistribution: [1x500 double]
negclusters: [1x1 struct]
negclusterslabelmat: [25x1 double]
negdistribution: [1x500 double]
cirange: [25x1 double]
mask: [25x1 logical]
stat: [25x1 double]
ref: [25x1 double]
dimord: 'chan_time'
label: {25x1 cell}
time: 0
cfg: [1x1 struct]
Specifically, I later run into trouble with the stat.posclusterslabelmat and stat.negclusterslabelmat matrices which should apparantly contain far more values something more like 25x500 instead of 25x1. When calling
neg_int = all(neg(:, m(k):m(k+1)), 2)
I get the "Index exceeds matrix dimensions" error message which I assume has to do with the fact that "neg" does not have the appropriate matrix dimensions
(neg = ismember(stat.negclusterslabelmat, neg_signif_clust); )
Where is the error / where should I look for the error?
Some further design details:
Nsubj = 24
2 conditions = Correct, Incorrect
Within-subject design
sampling rate = 500
34 channels
I hope I gave enough / the necessary information for someone to help me out.
Thanks in advance!
Best,
Anne
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
--
Nicholas Peatfield, PhD
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151210/deacc96c/attachment-0001.html>
More information about the fieldtrip
mailing list