<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi David,<div><br></div><div>It seems you are averaging both over time and frequency in ft_freqstatistics. As far as I know, the standard mean-function is used for that. If there are NaNs in your TFR, which happens now and then at the edges of the TFR, you get a NaN in the average.</div><div><br></div><div>Cheers,</div><div><br></div><div>Jan-Mathijs</div><div><br></div><div><br><div><div>On Nov 4, 2010, at 8:24 PM, David Ziegler wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div bgcolor="#ffffff" text="#000000"><font face="Georgia">Hi Fieldtrippers,<br><br>I am trying to run a comparison between TFRs from two groups of subjects and I keep getting some errors that I can't track down answers for. I seem to recall something like this being discussed on this list, but I can't for the life of me track down that thread at the moment. <span class="Apple-converted-space"> </span><br><br>I am using data from a neuromag 306 system on which I have calculated TFRs on the gradiometer data, then ran ft_combineplanar, followed by ft_freqdescriptives, followed by ft_freqgrandaverage for each of the two groups with the cfg.keepindividual = 'yes' option. I am able to plot the grand averages just fine, so the data seem to be ok (and there are fairly striking differences between the two). <span class="Apple-converted-space"> </span><br><br>When I run a permutation test to quantify the group differences, I get the following error messages (although the analysis does run):<br><br><i>computing statistic 500 from 500<br>Warning: Not all replications are used for the computation of the statistic.<br>> > In statfun_indepsamplesT at 57<br> In statistics_montecarlo at 298<br> In fieldtrip-20100617/private/statistics_wrapper at 285<br> In ft_freqstatistics at 105<br>Warning: Divide by zero.</i><br><br>When I inspect the output file, the .stat contains a single column of NaNs. Does anyone know what I am doing wrong here? <span class="Apple-converted-space"> </span><br><br>Here is the actual code I am using to run the statistics:<br><br>cfg = [];<br>cfg.channel = {'MEG *3'}; %only combined gradiometer data<span class="Apple-converted-space"> </span><br>cfg.layout = 'neuromag306cmb_dz.lay';<br>cfg.latency = [0.2 0.8];<br>cfg.avgovertime = 'yes';<br>cfg.avgoverchan = 'no';<br>cfg.avgoverfreq = 'yes';<br>cfg.parameter = 'powspctrm';<br>cfg.frequency = [14 26];<br>cfg.method = 'montecarlo';<br>cfg.statistic = 'indepsamplesT';<br>cfg.correctm = 'no';<br>cfg.clusteralpha = 0.05;<br>cfg.clusterstatistic = 'maxsum';<br>cfg.minnbchan = 2;<br>cfg.tail = 0;<br>cfg.clustertail = 0;<br>cfg.alpha = 0.05;<br>cfg.numrandomization = 500;<br><br>cfg.design = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ; % subject number<br> 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2]; % 12subjs in grp1, 13subjs in grp2<br>cfg.uvar = 1; <span class="Apple-converted-space"> </span><br>cfg.ivar = 2; <span class="Apple-converted-space"> </span><br><br>GA_low_stat = ft_freqstatistics(cfg, GA_grp1_low, GA_grp2_low)<br><br>Thanks,<br>David<br><br><br></font><div class="moz-signature">--<span class="Apple-converted-space"> </span><br><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PostalCode"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="State"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="Street"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="address"><div class="Section1" style="page: Section1; "><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; "><span style="font-size: 11pt; font-family: 'Bodoni MT'; ">David A. Ziegler<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; "><span style="font-size: 11pt; font-family: 'Bodoni MT'; ">Department of Brain and Cognitive Sciences<span class="Apple-converted-space"> </span><br>Massachusetts Institute of Technology<span class="Apple-converted-space"> </span><br><st1:street w:st="on"><st1:address w:st="on">43 Vassar St</st1:address></st1:street><span class="GramE">,<span> <span class="Apple-converted-space"> </span></span>46</span>-5121<span class="Apple-converted-space"> </span><br><st1:place w:st="on"><st1:city w:st="on">Cambridge</st1:city>,<span class="Apple-converted-space"> </span><st1:state w:st="on">MA</st1:state> <span class="Apple-converted-space"> </span><st1:postalcode w:st="on">02139</st1:postalcode></st1:place><o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; "><span style="font-size: 11pt; font-family: 'Bodoni MT'; ">Tel: 617-258-0765<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; "><span style="font-size: 11pt; font-family: 'Bodoni MT'; ">Fax: 617-253-1504<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; "><span style="font-size: 11pt; font-family: 'Bodoni MT'; "><a href="mailto:daz@mit.edu" style="color: blue; text-decoration: underline; ">daz@mit.edu</a><o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; "><span style="font-family: Garamond; "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; "><span style="font-family: Garamond; "><o:p> </o:p></span></div></div></o:smarttagtype></o:smarttagtype></o:smarttagtype></o:smarttagtype></o:smarttagtype></o:smarttagtype></div><p>--------------------------------------------------------------------------- You are receiving this message because you are subscribed to<span class="Apple-converted-space"> </span><br>the FieldTrip list. The aim of this list is to facilitate the discussion<span class="Apple-converted-space"> </span><br>between users of the FieldTrip toolbox, to share experiences<span class="Apple-converted-space"> </span><br>and to discuss new ideas for MEG and EEG analysis.<span class="Apple-converted-space"> </span><br>See also<span class="Apple-converted-space"> </span><a href="http://listserv.surfnet.nl/archives/fieldtrip.html" style="color: blue; text-decoration: underline; ">http://listserv.surfnet.nl/archives/fieldtrip.html</a><span class="Apple-converted-space"> </span><br>and<span class="Apple-converted-space"> </span><a href="http://www.ru.nl/neuroimaging/fieldtrip" style="color: blue; text-decoration: underline; ">http://www.ru.nl/neuroimaging/fieldtrip</a>.<br>---------------------------------------------------------------------------</p></div></span></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Dr. J.M. (Jan-Mathijs) Schoffelen </div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><a href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: 0031-24-3614793</div></div></span></div></span> </div><br></div></body></html><p>---------------------------------------------------------------------------
You are receiving this message because you are subscribed to <br>
the FieldTrip list. The aim of this list is to facilitate the discussion <br>
between users of the FieldTrip toolbox, to share experiences <br>
and to discuss new ideas for MEG and EEG analysis. <br>
See also http://listserv.surfnet.nl/archives/fieldtrip.html <br>
and http://www.ru.nl/neuroimaging/fieldtrip.<br>
---------------------------------------------------------------------------</p>