[Eeglablist] mean(single trial newtimef) != newtimef(all trials)

Mikołaj Magnuski imponderabilion at gmail.com
Tue Oct 7 15:10:39 PDT 2014


Hey Russell,

I think the difference stems from the fact that you represent your
single-trial data in dB. Averaging in 'dB space' is not identical to
averaging in your original 'power space'. Generally:
log(mean(values)) =\= mean(log(values))

EEGLAB turns the data to dB after the averaging. So when you use newtimef
to get single trials or use it for all of your trials at once your data are
in dB. But the all-data trials have been averaged before 10*log10(power)
while you average your single trials which are already in dB.
For example: adding stuff in dB space is the same as multiplying in
original space
a * b = 10^(log10(a) + log10(b))
so the results of mean are different when used in original vs dB space.
 7 paź 2014 21:35 "Russell Butler" <Russell.Buttler at usherbrooke.ca>
napisał(a):

>
>
> Hello, i've noticed a discrepancy between the two modes of calculating
> ersp in eeglab where i believe there should be no such discrepancy. i'm
> referring to the function newtimef, which can be run on single trials, or
> on a vector of trials.
>
> when i call newtimef with my vector of trials (ie, sending all trials at
> once to the function), i get back a nice mean ersp of all my trials, with
> most of the points in my baseline period coming out around zero.
>
> however, when i compute the newtimef on a single trial basis, and then
> average the results, i get my baseline period as being around -2db, and all
> other values are shifted 2 db to the negatives as well (ie, when i send all
> the trials at once to newtimef i get an ersp of around 4db in the task
> period, but when i compute single trials, and then average, i get an ersp
> of around 2db in the task period).
>
> i've tried playing around a bit with the arguments, ie, using the
> 'trialbase' argument, but it doesn't change anything.
>
> i need these single trials for my anovas, but i have to be sure that i'm
> actually computing them correctly...does anyone know how i can correct this
> systematic under-estimation due to averaging of the single trial ersp?
>
> thanks
>
> Russell
>
>
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20141008/b721aadc/attachment.html>


More information about the eeglablist mailing list