<div dir="ltr">es, I am not sure whether or not those formulas are correct. I 
found this on the ERP tutorial (see below). Now according to this bit of
 the tutorial the formulae we used should be good to get Lateralised 
readiness potential waveforms. As far as I know this are waveforms down 
to motor responsed. Not sure if you they can be down to <span class="">CDA</span>. I mean is LRP equal to <span class="">CDA</span>? if so, then the formula below has to be right to be used to compute <span class="">CDA</span>. If not, then I ve got no clue how to compute the <span class="">cda</span>.<br>

<br>MP<br><br><h1><a name="13ed68c71100a1c9_Specifying_subsets">Specifying subsets of channels</a></h1><p>It
 is also possible to specify different subsets of channels for the 
different bins being used in a given equation.  For example, if you are 
trying to compute a lateralized readiness potential (LRP) waveform, you 
will want to subtract trials with an ipsilateral response from trials 
with a contralateral response, averaged across the left and right 
hemispheres.  That is, you want to make a contralateral average 
(left-hemisphere electrode sites for right-hand responses averaged with 
right-hemisphere electrode sites for left-hand responses) and an 
ipsilateral average (left-hemisphere sites for left-hand responses 
averaged with right-hemisphere sites for right-hand response) and 
compute the difference. </p><p>To do this in Bin 
Operations, you first define sets of electrodes corresponding to the 
left and right hemispheres.  Imagine that the electrode sites 1-6 are as
 follows 1=F3, 2=F4, 3=C3, 4=C4, 5=P3, 6=P4.  And imagine that Bin 1 
corresponds to left-hand responses whereas Bin 2 corresponds to 
right-hand responses.  The following shows how you would define left- 
and right-hemisphere groups and use them to form a contralateral 
waveform (new Bin 1), an ipsilateral waveform (new Bin 2), and a 
contra-minus-ipsi difference wave (new Bin 3):</p><p>LH = [1 3 5]</p><p>RH = [2 4 6]</p><p>b1 = (b2@LH + b1@RH)/2 label Average Contra</p><p>b2 = (b1@LH + b2@RH/2 label Average Ipsi</p>
<p><br></p><p><br></p><p><br></p><p><br></p><p><br></p><p>b3 = ((b2@LH + b1@RH)/2) – ((b1@LH + b2@RH)/2) label Average Contra Minus Ipsi</p><div class=""><div id=":yo" class="" tabindex="0"><img class="" src="https://mail.google.com/mail/u/0/images/cleardot.gif"></div>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 6, 2012 at 9:49 AM, Gunseli, E. <span dir="ltr"><<a href="mailto:e.gunseli@vu.nl" target="_blank">e.gunseli@vu.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="blue" vlink="purple" lang="NL">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Dear</span><span lang="EN-US">
</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Massimiliano,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Probably b1 includes the trials at which the memory item is presented on the left visual field and b2 is when it is presented on the right visual
 hemifield.<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Then the CDA should be calculated with the below formula:<u></u><u></u></span></p>

<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">nbin1= ((b2@LH + b1@RH)/2 - (b1@LH + b2@RH)/2 ) label CDA 
</span><span style="font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">I would be glad if some expert member would confirm the formula.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">By the way, including only the trials with correct behavioral response would be a better idea.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Best regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Eren Gunseli
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US"> <a href="mailto:eeglablist-bounces@sccn.ucsd.edu" target="_blank">eeglablist-bounces@sccn.ucsd.edu</a> [mailto:<a href="mailto:eeglablist-bounces@sccn.ucsd.edu" target="_blank">eeglablist-bounces@sccn.ucsd.edu</a>]
<b>On Behalf Of </b>Massimiliano Papera<br>
<b>Sent:</b> Monday, November 05, 2012 17:59<br>
<b>To:</b> <a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a><br>
<b>Subject:</b> [Eeglablist] How to compute the CDA in EEGLAB (contralateral delay activity)<u></u><u></u></span></p>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Dear All,<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">I am investigating the relationship between Attention and Memory and would like to use the Contralateral Delay Activity (CDA) as a correlate of the visual working memory. I am dealing
 with the bin operations function.<u></u><u></u></p>
<p class="MsoNormal">I would like to check through the Discussion list if anyone who is familiar with the CDA knows I am using the right coding to get my CDA component across three different conditions.<u></u><u></u></p>

<p class="MsoNormal">I am investigating 3 different pair of electrodes (p3-4, o1-2 and p7-8) for correct and incorrect responses. However I am not sure if I need to filter out the incorrect trials.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Thank you<u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">ERP = pop_binoperator( ERP, {</span><span style="font-size:10.0pt;font-family:"Courier New";color:#a020f0">'LH = [18
 23 24]'</span><span style="font-size:10.0pt;font-family:"Courier New"">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#a020f0">'RH = [14 28 27]'</span><span style="font-size:10.0pt;font-family:"Courier New"">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#a020f0">'nb1= b1@RH-b1@LH label CDA LVF20'</span><span style="font-size:10.0pt;font-family:"Courier New"">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#a020f0">'nb2= b2@LH-b2@RH label CDA RVF20'</span><span style="font-size:10.0pt;font-family:"Courier New"">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#a020f0">'nb3= b3@RH-b3@LH label CDA LVF40'</span><span style="font-size:10.0pt;font-family:"Courier New"">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#a020f0">'nb4= b4@LH-b4@RH label CDA RVF40'</span><span style="font-size:10.0pt;font-family:"Courier New"">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#a020f0">'nb5= b5@RH-b5@LH label CDA LVF22'</span><span style="font-size:10.0pt;font-family:"Courier New"">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#a020f0">'nb6= b6@LH-b6@RH label CDA RVF22'</span><span style="font-size:10.0pt;font-family:"Courier New"">});</span><u></u><u></u></p>

<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">  
</span><u></u><u></u></p>
<p class="MsoNormal">This gives me 6 bins, 2 per each of the 3 conditions. Each pair gives me erp for either left visual field (LVF) or right visual field (RVF).<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">To get the CDA I now subtract  the activity between left and right visual field trials for all of the 3 conditions:<u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">ERP = pop_binoperator( ERP, {</span><span style="font-size:10.0pt;font-family:"Courier New";color:#a020f0">'nbin1=
 b1-b2 label CDA 2T0D'</span><span style="font-size:10.0pt;font-family:"Courier New"">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#a020f0">'nbin2=b3-b4 label CDA 4T0D'</span><span style="font-size:10.0pt;font-family:"Courier New"">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#a020f0">'nbin3=b5-b6 label CDA 2T2D'</span><span style="font-size:10.0pt;font-family:"Courier New""> });
</span><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">This gives me 3 CDA component, one for each condition.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Does anyone know if this is correct to compute the CDA?<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Thank you
<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Thanks to everyone<u></u><u></u></p>
<p class="MsoNormal">Massimiliano Papera<u></u><u></u></p>
</div></div></div>
</div>

</blockquote></div><br></div>