<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Mark,<br>
<br>
I agree with Steve. Though, in order to not re-compute the averages,
you could create the weighted average yourself. Just make a weight
vector like this:<br>
<br>
<i><small>weights = no_trials_cond_A /
(no_trials_cond_A+no_trials_cond_B);</small></i><br>
<br>
Where <i><small>no_trials_cond_A </small></i><small><big>and <i><small>*_b</small></i>
contai the number of trials</big></small> in condition A and B,
respectively.<br>
Then you can take the weighted sum of the two grand-averages you
have, something like:<br>
<br>
<i><small> grandavg.individual = condA.individual * weights +
condB.individual * (1-weights);</small></i><br>
<br>
This is mathematically equivalent to re-computing the average on all
trials (note that I am not sure whether this holds for spectral
denisity matrices and stuff like that, but for ERPs and plain
powerspectra, does).<br>
<br>
Best,<br>
Jörn<br>
<br>
On 3/19/2012 12:08 PM, Stephen Politzer-Ahles wrote:
<blockquote
cite="mid:CAJT2k_80VhT3oBTNCLipJz5J9PDg2y-DjuRecYWdP9ZaP1ZThQ@mail.gmail.com"
type="cite">Hi Mark,<br>
<br>
Do you mean to combine multiple conditions into a single
condition? For that I'm not sure of a built-in function that can
do this using grand averages; you might need to re-do
ft_timelockanalysis for the new condition and then make new grand
averages. Since it's possible that a given subject has more trials
contributing to her average for condition A than for condition B,
simply averaging the two condition averages together might not be
accurate.<br>
<br>
Best,<br>
Steve Politzer-Ahles<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: 2<br>
Date: Mon, 19 Mar 2012 11:37:47 +0100<br>
From: Eelke Spaak <<a moz-do-not-send="true"
href="mailto:eelke.spaak@donders.ru.nl">eelke.spaak@donders.ru.nl</a>><br>
To: Email discussion list for the FieldTrip project<br>
<<a moz-do-not-send="true"
href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>><br>
Subject: Re: [FieldTrip] Combine Grand Average<br>
Message-ID:<br>
<<a moz-do-not-send="true"
href="mailto:CABPNLUoTApRzDeyZGvWFfwJjxQcE_QgTwf%2BpRJcy-jjh%2B_E7iA@mail.gmail.com">CABPNLUoTApRzDeyZGvWFfwJjxQcE_QgTwf+pRJcy-jjh+_E7iA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
Hi Mark,<br>
<br>
I am not entirely sure, but I think ft_appendtimelock might be
what<br>
you are looking for. If not, you could probably also just
append the<br>
timelocked information 'by hand':<br>
<br>
tl_combined = tl1;<br>
tl_combined.individual = [tl1.individual; tl2.individual];<br>
<br>
But be aware that this could get messy, and you then need to
make sure<br>
the .avg and other fields are still consistent. So, if at all<br>
possible, stick to ft_appendtimelock :)<br>
<br>
Best,<br>
Eelke<br>
<br>
On 16 March 2012 18:05, Mark Noordenbos <<a
moz-do-not-send="true"
href="mailto:mark.noordenbos@gmail.com">mark.noordenbos@gmail.com</a>>
wrote:<br>
> Hi,<br>
><br>
> I'm looking for a function that combines two timelocked
Grand Averages<br>
> (keeping the 'subj_chan_time' dimord).<br>
> I have for several conditions seperate Grand Averages,
but now I need to<br>
> combine some of them into a new Grand Average while
keeping the individual<br>
> data.<br>
><br>
> Does Fieldtrip has a buit-in function to do this?<br>
><br>
> When just calculating the mean, one dimension ('subj' or
'chan' or 'time')<br>
> is always lost.<br>
><br>
> Thanks,<br>
> Mark<br>
><br>
><br>
> --<br>
> Mark Noordenbos, MSc<br>
><br>
> Radboud University Nijmegen<br>
> Behavioural Science Institute<br>
><br>
> P.O. Box 9104, Room A05.36<br>
> 6500 HE Nijmegen<br>
> The Netherlands<br>
><br>
> Email: <a moz-do-not-send="true"
href="mailto:m.noordenbos@bsi.ru.nl">m.noordenbos@bsi.ru.nl</a><br>
> Telephone: <a moz-do-not-send="true"
href="tel:%2B31%2024%203612070" value="+31243612070">+31 24
3612070</a><br>
> Fax:? ? ? ? ? <a moz-do-not-send="true"
href="tel:%2B31%2024%203616211" value="+31243616211">+31 24
3616211</a><br>
><br>
> <a moz-do-not-send="true" href="http://www.ru.nl"
target="_blank">http://www.ru.nl</a><br>
><br>
><br>
> _______________________________________________<br>
> fieldtrip mailing list<br>
> <a moz-do-not-send="true"
href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
> <a moz-do-not-send="true"
href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip"
target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<br>
</blockquote>
</div>
<br>
<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
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>