[Eeglablist] Difference wave calculation: disparity in pop_comperp and matlab calculations

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Fri Jul 1 19:04:32 PDT 2016


Dear Nicola,

Hmm ok.
Since your code below is perfect,

ERP1 = mean(EEG.data,3);
ERP2 = mean(EEG.data,3);
Difference_ERP = ERP1 – ERP2 ;

is it possible for you to compare the 'Difference' above with 'erpsub'
below?

[erp1, erp2, erpsub, times, pvalues] = pop_comperp( ALLEEG, flag, datadd,
datsub, varargin);

So you perform

finalAns = Difference_ERP - erpsub

They should be identical.

Makoto



On Fri, Jul 1, 2016 at 4:54 AM, <n.johnstone at surrey.ac.uk> wrote:

> Dear list,
>
>
>
> When calculating difference waves, I have found that when using
> pop_comperp the graph output differs from when I perform a subtraction in
> Matlab:
>
> ERP1 = mean(EEG.data,3);
>
> ERP2 = mean(EEG.data,3);
>
> Difference_ERP = ERP1 – ERP2 ;
>
> And plot this in a Matlab figure.
>
>
>
> The values are always larger in the Matlab figure, and look less like the
> difference ERP I’d expect, whereas the result of pop_comperp looks much
> more reasonable, as are the values. I’ve examined the pop_comperp function
> and it seems to apply the same subtraction processes as the Matlab command
> line subtraction – so I cannot figure out why there’d be a disparity in
> results.
>
> I’d like to be able to extract data from these difference waves using
> Matlab for statistical analyses, but I’d like to understand why these
> results diverge in the first instance.
>
> Can anyone offer an explanation for why there’s a ‘difference’ in my
> difference waves?
>
>
>
> Best,
>
> Nicola
>
>
> _______________________________________________
> 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
>



-- 
Makoto Miyakoshi
Swartz Center for Computational Neuroscience
Institute for Neural Computation, University of California San Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20160701/6f9af9c5/attachment.html>


More information about the eeglablist mailing list