Hi Caroline,<br><br>It looks to me like your grand averages don't have any EEG data in them; here is what mine look like:<br><br><span style="font-family:courier new,monospace"> label: {60x1 cell}<br> time: [1x601 double]<br>
individual: [19x60x601 double]<br> dimord: 'subj_chan_time'<br> cfg: [1x1 struct]<br> elec: [1x1 struct]</span><br><br>To run cluster statistics your structure has to have that "individual" field, which has the ERPs for each subject (for instance, from mine you can see I had 19 subjects with a 60-channel cap, and 601 samples in the epoch). I got mine by importing each subject's data into FieldTrip, and then using ft_timelockgrandaverage() with cfg.keepindividual='yes'.<br>
<br>That is my guess about what your problem is, but I could be wrong. After you ran it, did you check stat.posclusters and stat.negclusters? I think those are more important than stat.stat and stat.prob; they tell you which clusters are actually significant (and stat.posclusterslabelmat and stat.negclusterslabelmat tell you where/when the clusters are).<br>
<br>Best,<br>Steve<br><br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Message: 1<br>
Date: Sun, 11 Nov 2012 13:25:31 +0000<br>
From: Lustenberger Caroline <<a href="mailto:Caroline.Lustenberger@kispi.uzh.ch">Caroline.Lustenberger@kispi.uzh.ch</a>><br>
To: "<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>" <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>><br>
Subject: [FieldTrip] Cluster statistics<br>
Message-ID: <<a href="mailto:2B94F80C-7331-45B9-86BF-2ED1123B680A@kispi.uzh.ch">2B94F80C-7331-45B9-86BF-2ED1123B680A@kispi.uzh.ch</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Dear fieldtrip users<br>
<br>
I tried to perform cluster analysis with fieldtrip. Since I've performed preprocessing/frequency analysis before using fieldtrip, I had to form the specific<br>
data structure to use for ft_freqstatistics by myself.<br>
<br>
I made a a structur as follows:<br>
Condition 1 'EEGa':<br>
--> 10 subjects:<br>
EEGa{1:10}<br>
label: {128x1 cell} %128 egi elec.<br>
dimord: 'chan_freq'<br>
freq: 1<br>
powspctrm: [128x1 double]<br>
cumtapcnt: 1<br>
cfg: [1x1 struct]<br>
<br>
Condition 2 'EEGm':<br>
EEGm{1:10}<br>
label: {128x1 cell}<br>
dimord: 'chan_freq'<br>
freq: 1<br>
powspctrm: [128x1 double]<br>
cumtapcnt: 1<br>
cfg: [1x1 struct]<br>
<br>
<br>
Then I performed the following steps:<br>
<br>
cfg = [];<br>
<br>
cfg.elec = elec; %was defined before EGI 128 electrodes<br>
<br>
cfg.neighbours = neighbours; %also successfully defined before<br>
<br>
cfg.latency = 'all';<br>
<br>
%cfg.frequency = 'all';<br>
<br>
cfg.channel = 'all';%eleselection % see CHANNELSELECTION<br>
<br>
cfg.avgovertime = 'no';<br>
<br>
%cfg.avgoverfreq = 'no';<br>
<br>
cfg.avgoverchan = 'no';<br>
<br>
cfg.statistic = 'depsamplesT';<br>
<br>
cfg.numrandomization = 2^10;<br>
<br>
cfg.correctm = 'cluster';<br>
<br>
cfg.method = 'montecarlo';<br>
<br>
cfg.clusteralpha = 0.05;<br>
<br>
cfg.alpha = 0.05;<br>
<br>
cfg.alpha = 0.05;<br>
<br>
cfg.clustertail = 0;<br>
<br>
cfg.feedback = 'gui';<br>
<br>
cfg.parameter = 'powspctrm';<br>
<br>
cfg.design = [<br>
<br>
1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9<tel:9%2010%201%202%203%204%205%206%207%208%209> 10 % subject number<br>
<br>
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number<br>
<br>
cfg.uvar = 1; % "subject" is unit of observation<br>
<br>
cfg.ivar = 2; % "condition" is the independent variable<br>
<br>
stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:});<br>
<br>
<br>
<br>
<br>
The function ft_freqstatistics runs but the stats results are strange.<br>
My stats.stat is always -inf<br>
and stats.prob always 0<br>
<br>
What might be the problem?<br>
<br>
<br>
Thanks and all the best<br>
Caroline<br>
</blockquote></div><br>