<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Patrick,<br>
<br>
I think you have to write this yourself. I never tried though, so
maybe there is a way.<br>
<br>
It's a tricky thing to what you want, so I guess that's why it is
not implemented. If you average for some time bins over less
repetitions than for others, you get a weaker noise estimate,
thereby any effects found or not found could be attributed to
plain noise. Put in another way, depending on what analysis you
are doing, you might get into trouble with your statistics because
of different degrees of freedom per time bin. Also note that for
frequency data, power has only positive values with a lower bound
of zero, thus noise can only increase the power estimate and not
cancel out (so more noise = more power), thus a difference in a
later time bin between conditions might be explained by having
lower df (fewer observations, more noise) in one condition than in
the other, especially if power is greater in the condition with
fewer observation.<br>
<br>
I would strongly suggest to throw out trials which do not reach
your time of interest and process only these (i.e. throw out that
one subject) unless you really know what you are doing. On the
other hand as already mentioned, I never tried and never did this,
so maybe there is some neat way to achieve what you want (you'd be
probably notice, cause people would reply to this response rather
fast).<br>
<br>
Best,<br>
Jörn<br>
<br>
On 2/8/2013 12:06 PM, Jung, Patrick wrote:<br>
</div>
<blockquote
cite="mid:36E953F5321EB743AC6B338995A56D6304A9C84C@UM-EXCDAG-A01.um.gwdg.de"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.searchhit
{mso-style-name:search_hit;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:686490312;
mso-list-type:hybrid;
mso-list-template-ids:-952700956 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB">Hi Fieldtrippers, <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal">To get a feeling of my data I want to
visually inspect the data and look where are differences
between the
<span class="searchhit">conditions</span> <o:p></o:p></p>
<p class="MsoNormal">by plotting the grand-averages of TFRs. <o:p></o:p></p>
<p class="MsoNormal">By using <b><span style="color:black">ft_freqgrandaverage</span></b><span
style="color:black"> I noticed that it gives back
<b>NaN</b> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">if freq entries
for one time bin are missing for one subject (n=28).
<o:p></o:p></span></p>
<p class="MsoNormal"><img id="Picture_x0020_3"
src="cid:part1.00060304.02050208@donders.ru.nl" width="623"
height="165"><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"
style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span
style="color:black"><span style="mso-list:Ignore">1.<span
style="font:7.0pt "Times New Roman"">
</span></span></span><!--[endif]--><span
style="color:black">sSTOP,
2. cAC, 3.
diff<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:black">In my data with
variable trial lengths, the shortest poststim time point is
around 0.06 s in one condition (cAC) and in one subject<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">but I expect my
effects around 0.1-0.35 s.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">How can I
overcome this problem? Is there a more appropriate fieldtrip
function or do I have to write a special self-made Matlab
code?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:black">Here is an
excerpt of my code:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">GA_sSTOP =
ft_freqgrandaverage(cfg, AllSubjMat_sSTOP{1,:});<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">% where
AllSubjMat_sSTOP contains TFRs of all subjects in a <1x28
cell><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">GA_cAC =
ft_freqgrandaverage(cfg, AllSubjMat_cAC{1,:});<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">GA_diff.powspctrm
= (GA_sSTOP.powspctrm - GA_cAC.powspctrm) ./
(0.5*GA_sSTOP.powspctrm + 0.5*GA_cAC.powspctrm);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:black">Many thanks for
your help!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:black">Cheers, <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">Patrick<o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="color:black"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><span style="color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
fieldtrip mailing list
<a class="moz-txt-link-abbreviated" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>
<a class="moz-txt-link-freetext" href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
Neuronal Oscillations Group
FieldTrip Development Team
P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands
Contact:
E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>
Tel: +31-(0)24-36-68493
Web: <a class="moz-txt-link-freetext" href="http://www.ru.nl/donders">http://www.ru.nl/donders</a>
Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands</pre>
</body>
</html>