EEP Algorithm Details

Rainer Nowagk Max-Planck-Institute of Cognitive Neuroscience, Leipzig

July 1998

Contents

1 Introduction 1

2 cntdetrend/avrdetrend - Linearity Error Criterion 2

3 cntaverage - Data/Noise Covariance Matrices 2

4 avraverage/avrprocess/xavr - Grand Averaging 2

5 avraverage - (Normalized) Window Averages 3

6 xavr - Significance Test 3

7 xeog 4

1 Introduction

This document describes some of the algorithm details in the EEP 3.0 modules which are not covered in the HTML documentation pages. It doesn’t contain everything which can be done with EEP – a difference computation or a threshold comparison should need no special explanation – but the steps where one could be in doubt about the details are listed here.

There are two reasons to put this kind of information in a separate document: First, producing mathematical formulas in HTML documents is annoying; second, this kind of reference information is rarely needed and would unneccesarily blow up the HTML “daily use” documentation. (Some say that a HTML documentation is blown up and that classic man-pages are much better...)

2 cntdetrend/avrdetrend - Linearity Error Criterion

3 cntaverage - Data/Noise Covariance Matrices

4 avraverage/avrprocess/xavr - Grand Averaging

Each value in an ERP is an averaged value, described by the mean, the variance and the number of averaged items(m, v, n). EEP offers three methods to average multiple (N) of such ERP’s into a so-called “Grand Average” (m′, v′, n′):

• Standard Grand Averaging

m′ = \frac{1}{N} ∑_{i=1}^{N} m_{i}

v′ = \frac{1}{N} ∑_{i=1}^{N}(m′ − m_{i})^{2}
n′ = N

• Signal/Noise weighting

k =  \sqrt[∑_{i=1}^{N}]{n_{i}}

m′ = \frac{1}{k} ∑_{i=1}^{N} \sqrt{n_{i}}m_{i}

v′ = \frac{1}{k} ∑_{i=1}^{N} \sqrt{n_{i}}(m′ − m_{i})^{2}
n′ = N

• Accumulation The sum of the averaged items x and the sum of the squares of the averaged items are computed from the mean/variance in each input ERP:

s_{1} = ∑ x = n · m
s_{2} = ∑ x^{2} = n · (v + m^{2})

Using these sums, the average of all items in all N input ERP’s is computed:

n′ = ∑_{i=1}^{N} n_{i}

m′ = \frac{1}{n′} ∑_{i=1}^{N} s_{1}_{i}
v′ = \frac{1}{n′} (∑_{i=1}^{N} s_{2}_{i} − \frac{1}{n′} s_{1}_{i}^{2})

5 avraverage - (Normalized) Window Averages

The WindowAverages values are computed as

y_{s,c,e,w} = \frac{1}{n_{p}} ∑_{p=1}^{n_{p}} v_{s,c,e,w,p}

with

s = 1, …, n_{s}  subjects [files]
c = 1, …, n_{c}  conditions [SAS conditions]
e = 1, …, n_{e}  electrodes [SAS channels]
w = 1, …, n_{w}  windows [SAS windows]
p = 1, …, n_{p}  sample points [SAS windows]
v_{s,c,e,w,p} – a single ERP value in the study

The NormWindowAverages values are derived from the WindowAverages as

z_{s,c,e,w} = \frac{y_{s,c,e,w} − m_{c,w}}{s_{c,w}}

with

x_{c,e,w} = \frac{1}{n_{s}} ∑_{s=1}^{n_{s}} y_{s,c,e,w}
m_{c,w} = \frac{1}{n_{e}} ∑_{e=1}^{n_{e}} x_{c,e,w}
s_{c,w} = \sqrt{\frac{1}{n_{e}} ∑_{e=1}^{n_{e}} (x_{c,e,w} − m_{c,w})^{2}}

6 xavr - Significance Test

A t-test for independent samples is computed for each point in the two ERP curves which are to be compared. The following input can be loaded directly from the ERP data files:

x̄_{1}, x̄_{2} – observed sample mean
σ̂_{1}^{2}, σ̂_{2}^{2} – estimated population variance
n_{1}, n_{2} – number of elements in sample

The actual t-value is computed using the common formulas (there is nothing special with it, just a little L^{A}TEX practice...):

σ̂_{(x̄_{1}−x̄_{2})} = \sqrt{\frac{(n_{1} − 1) · σ̂_{1}^{2} + (n_{2} − 1) · σ̂_{2}^{2}}{(n_{1} − 1) + (n_{2} − 1)} · (\frac{1}{n_{1}} + \frac{1}{n_{2}} )}
t = \frac{x̄_{1} − x̄_{2}}{σ̂_{(x̄_{1}−x̄_{2})}}

The two-sided error probability α which fulfills

t = t_{n_{1}+n_{2}−2, \frac{α}{2}}

is computed using a numeric approximation of the t-distribution and shown in xavr’s semilogarithmic significance diagrams.

7 xeog