[FieldTrip] Stats matrix incomplete - cluster-based permutation test
Stephen Politzer-Ahles
stephen.politzer-ahles at ling-phil.ox.ac.uk
Sun Dec 13 12:12:40 CET 2015
Hi Anne,
It looks like you're running stats on grand-average structures created with
cfg.keepindividual='no' (because your Correct and Incorrect structures have
an .avg field). I always do stats on a grand-average structure created with
cfg.keepindividual='yes' (which will yield a structure with no .avg field,
and instead an .individual field, which in your case will be 24x34x600,
since you have participants). Do things work out better if you try it that
way?
Best,
Steve
---
Stephen Politzer-Ahles
University of Oxford
Language and Brain Lab
Faculty of Linguistics, Phonetics & Philology
http://users.ox.ac.uk/~cpgl0080/
>
> Message: 1
> Date: Thu, 10 Dec 2015 18:14:10 +0100
> From: Anne Mickan <amickan1990 at gmail.com>
> To: fieldtrip at science.ru.nl
> Subject: [FieldTrip] Stats matrix incomplete - cluster-based
> permutation test
> Message-ID:
> <
> CANX43OJN4h_1jEuDKMNwQC4sHeW+E2_StnS3WLkEbOkVpMerQA at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> 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
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151213/9635511d/attachment-0002.html>
More information about the fieldtrip
mailing list