[Eeglablist] Removal of distortion due to overlapping ERP responses - ADJAR filter

Achim, André achim.andre at uqam.ca
Thu Oct 14 08:47:49 PDT 2010


The following MATLAB function extracts two 'clean' means that are thought to overlap additively at varying delays. I used it to separate components linked to stimulus from those linked to responses, even though it is highly optimistic, in this case, to assume that the processing of the stimulus is constant despite leading to varying reaction times. To simplify the process, the input are here the total of both raw conditions, instead of the means. In your case totS would be the total spatio-temporal ERP (or average multiplied by the number of trials in the average) time locked to event A and totR the ERP time locked to event B (see lated for number of data points). The third parameter is the list of all individual delays between A en B, expressed in sampling points (i.e. the amount of sliding of the clean responses relative to each other that is currently expressed in the input ERPs as cross contamination). The number of trials in the averages is obtained from the number of elements in argument TR (French abbreviation for Reaction Times, representing the delays between events in my application). On output, you get the respective clean versions, which are averages (not totals as for input).

On input, totS and totR are both (nchannels,npoints). The latter size must be such that, at your largest lag, both totals are aligned in time. For instance, if (a) you consider a minimum baseline of 50 sampling points, (b) your largest lag is 175 sampling points and (c) your second condition may produce a response up to 200 sampling points from stimulus B onset, npoints would be 425 (=50+175+200). Your total tots, time locked to your stimulus A, would cover -50 to +375 time points while your total totR, time locked to your stimulus B, would cover -225 to +200.

The procedures starts with poor estimates of the two 'clean' signals, MS and MR, as if they were known; these initial estimates are simply the respective contaminated averages obtained from the totals in input. 'Knowing' these, we can apply the delays to MS to see how it contaminates MR and subtract that contamination to better estimate MR. The estimate of MR is also smeared by the set of delays to estimate its contamination on MS. Subtracting it from MS yields a better estimate of MS. Iteration proceed until no point in MS or MR, at any channel, changed by more than 1e-5 (the value of crit set in the first line of code), subject to a maximum of 1000 iterations.

You may want to change the name of the function and of its arguments to something more meaningful in English (name and comments are in French), but is should do the job. If your stimuli A and B may take several values, you should consider effecting the separation independently for each combination of A and B, as the model implies that the responses to A and to B are each constant across trials.

Yours

André Achim



function [MS,MR]=separation_S_R(totS,totR,TR)
% [MS,MR]=separation_S_R(totS,totR,TR);
% totS et totR sont des totaux (ncan,npts), tout comme sont les moyennes MS et MR en sortie et TR est la collection des délais
% de S à R en nombre de points d'échantillonnage (d'ou on infère le nb de cas pour faire les moyennes a partir des totaux)
% totS et totR sont considérés alignés pour le plus grand TR (les points de même rang étant simultanés dans les deux séries)
% by André Achim, Université du Québec à Montréal
crit=1e-5;
n=length(TR);
[ncan,npts]=size(totS);
MS=totS/n;
MR=totR/n;
TRm=max(TR);
deb=TRm-TR+1;    % début dans R (ou S) (la fin est npts) quand on soustrait R de S (ou S de R)
fin=npts-TRm+TR; % fin dans S (ou R) (le début est 1) quand on soustrait R de S (ou S de R)
for fois=1:1000  % maximum 1000 réévaluations de MS et MR
    tot=totS;
    for k=1:n,
        tot(:,1:fin(k))=tot(:,1:fin(k))-MR(:,deb(k):npts);
    end
    tot=tot/n;
    errS=max(max(abs(tot-MS)));
    MS=tot;
    tot=totR;
    for k=1:n,
        tot(:,deb(k):npts)=tot(:,deb(k):npts)-MS(:,1:fin(k));
    end
    tot=tot/n;
    errR=max(max(abs(tot-MR)));
    MR=tot;
    if errS<crit & errR<crit, break; end
end

-----Message d'origine-----
De : eeglablist-bounces at sccn.ucsd.edu [mailto:eeglablist-bounces at sccn.ucsd.edu] De la part de Caspar M. Schwiedrzik
Envoyé : 7 octobre 2010 10:34
À : Niko Busch
Cc : eeglablist at sccn.ucsd.edu
Objet : Re: [Eeglablist] Removal of distortion due to overlapping ERP responses - ADJAR filter

Hi everyone,
we would also be very interested in a Matlab implementation of ADJAR.
Thanks and kind regards,
Caspar M. Schwiedrzik



2010/8/2 Niko Busch <mail at nikobusch.net>:
> Hi everyone,
>
> I am looking for a way to remove the distortion from an ERP waveformthat is due to overlapping ERP responses to different events. I willemploy an experimental paradigm in which an experimental event A isfollowed by an event B after a variable SOA on each trial. My interestis in the ERP evoked by the Bs. However, the resulting ERP waveform -time-locked to event B - will be "contaminated" by the responses to theAs.
>
> It seems that people use two different approaches to remove the contribution of the As:
> 1. Include trials with A events only and then subtract the average of A from the average of A+B.
> 2. A convolution approach - the ADJAR method specified in this paper:
>
> Woldorff MG. Distortion of ERP averages due to overlap from temporallyadjacent ERPs: analysis and correction. Psychophysiology. 1993Jan;30(1):98-119.
>
> Has anyone implemented ADJAR or something similar in Eeglab/Matlab andis willing to share the code? Any help would be very much appreciated!
>
> Best,
> Niko
> _______________________________________________
> 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
>

_______________________________________________
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



More information about the eeglablist mailing list