<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Steve<div>thanks for your reply. I think that solves my problem.</div><div>(I tried that already, but always got </div><div>"??? Improper index matrix reference"</div><div>but looks like I have to look closer again into the rest of the script, seems to be a problem with the clusters themselves).</div><div>Thanks for your help</div><div>Best</div><div>Leo</div><div><br></div><div><br><div><div>On 22.09.2011, at 15:48, Stephen Politzer-Ahles wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Leopold,<br><br>The way I dealt with this was by running ft_timelockgrandaverage() twice, once with keepindividual='yes' and once with keepindividual='no', and I saved the structures under different names (i.e., 'condition1_grandindividuals' and 'condition1_grandonly'). I used the former one for cluster statistics, and the latter one (which has the .avg field) for plotting. <br>
<br>Alternatively, for each grand average structure with individuals you could just create an .avg field by running the following:<br><br>GA.avg = squeeze( mean(GA.individual,1) );<br><br>This should average across individuals.<br>
<br>Best,<br>Steve Politzer-Ahles<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;">
<br>
Message: 2<br>
Date: Thu, 22 Sep 2011 14:49:14 +0200<br>
From: Zizlsperger Leopold <<a href="mailto:zizlsperger@gmail.com">zizlsperger@gmail.com</a>><br>
To: <a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
Subject: [FieldTrip] ft_timelockgrandaverage<br>
Message-ID: <<a href="mailto:058344EB-FCDD-42FB-8A60-E70A339F35F2@gmail.com">058344EB-FCDD-42FB-8A60-E70A339F35F2@gmail.com</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
Dear Fieldtrippers,<br>
<br>
in a within-subjects design I use ft_timelockgrandaverage with cfg.keepindividual = 'yes' to average timelocked EEG data (10 subjects) of the form:<br>
<br>
avg: [29x5000 double]<br>
var: [29x5000 double]<br>
time: [1x5000 double]<br>
dof: [29x5000 double]<br>
label: {29x1 cell}<br>
trial: [172x29x5000 double]<br>
dimord: 'rpt_chan_time'<br>
trialinfo: [172x28 double]<br>
cfg: [1x1 struct]<br>
<br>
I stick closely to the FieldTrip tutorial for cluster permutation statistics. I use the newest version of fieldtrip. After the grandaverage there is no more 'avg' in the structure, so I can not go on in the tutorial e.g. with:<br>
GA_XvsY = GA_X;<br>
GA_XvsY.avg = GA_X.avg - GA_Y.avg;<br>
<br>
New data is of structure:<br>
<br>
label: {29x1 cell}<br>
time: [1x5000 double]<br>
individual: [10x29x5000 double]<br>
dimord: 'subj_chan_time'<br>
cfg: [1x1 struct]<br>
<br>
Do I get the tutorial wrong or is it my data ?<br>
Thanks in advance<br>
Best<br>
Leopold<br>
</blockquote></div>
_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote></div><br></div></body></html>