﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 5  » counterbalancing with lists</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Tue, 07 Apr 2026 10:29:52 GMT</lastBuildDate><ttl>20</ttl><item><title>counterbalancing with lists</title><link>https://forums.millisecond.com/Topic22622.aspx</link><description>Hi,&lt;br/&gt;&lt;br/&gt;I have a counterbalancing problem on my visual search task I am not sure how to fix.&lt;br/&gt;&lt;br/&gt;My task has 12 different types of trials in a block (two different target letters each in 6 possible positions). The trials must be randomly selected (which they are). The unselected other 5 locations are filled by filler letters - picked from 5 lists. Two of the filler letters are actual letters and three are small O's. The filler letters are counterbalanced with each other so there are 48 combinations each - this is done by randomly selecting the first letter and then the other lists select from list.1.currentindex.&lt;br/&gt;&lt;br/&gt;But I made a mistake as the filler letter identity and positions are not connected to the position of the target letter (the trial). I need the filler letters to&amp;nbsp; be next to the target letter I.e if the target is in pos 1 then filler letter 1 will be in pos 2 and filler letter 2 will be in pos 3 (so they are both next to the target letter and not separated by small O filler letters). I also need the trial to be linked to the filler letter order.&lt;br/&gt;&lt;br/&gt;So that on list s3filler1 below. Every 6th letter is presented on trial.set3X1 (also below) (so the 1st, 6th, 13th and so on) and this letter is always presented in position 2.&lt;br/&gt;&lt;br/&gt;&amp;lt;list s3filler1&amp;gt;&lt;br/&gt;/ items = (picture.H1, picture.Z1, picture.O1, picture.M1, picture.K1, picture.O1, picture.W1, picture.H1, picture.O1, picture.Z1, picture.K1, picture.O1, picture.M1, picture.W1, picture.O1, picture.H1, picture.Z1, picture.O1, picture.M1, picture.K1, &lt;br/&gt;picture.O1, picture.W1, picture.H1, picture.O1, picture.Z1, picture.K1, picture.O1, picture.M1, picture.W1, picture.O1, picture.H1, picture.Z1, picture.O1, picture.M1, picture.K1, picture.O1, picture.W1, picture.H1, picture.O1, picture.Z1, picture.K1, &lt;br/&gt;picture.O1, picture.M1, picture.W1, picture.O1, picture.Z1, picture.K1, picture.O1)&lt;br/&gt;/ select = random&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial set3X1&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;values.valid = 0;&lt;br/&gt;values.validcorrect = 0;&lt;br/&gt;values.trialcount += 1]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler1.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler2.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler3.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler4.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler5.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [values.fillerhpos1 = expressions.hp2]&lt;br/&gt;/ ontrialbegin = [values.fillerhpos2 = expressions.hp3]&lt;br/&gt;/ ontrialbegin = [values.fillerhpos3 = expressions.hp4]&lt;br/&gt;/ ontrialbegin = [values.fillerhpos4 = expressions.hp5]&lt;br/&gt;/ ontrialbegin = [values.fillerhpos5 = expressions.hp6]&lt;br/&gt;/ ontrialbegin = [values.fillervpos1 = expressions.vp2]&lt;br/&gt;/ ontrialbegin = [values.fillervpos2 = expressions.vp3]&lt;br/&gt;/ ontrialbegin = [values.fillervpos3 = expressions.vp4]&lt;br/&gt;/ ontrialbegin = [values.fillervpos4 = expressions.vp5]&lt;br/&gt;/ ontrialbegin = [values.fillervpos5 = expressions.vp6]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.distractorX1.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [values.distractor = list.distractorX1.currentvalue;]&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;if (contains(list.distractorX1.currentvalue, ".X")) expressions.category = "congruent"&lt;br/&gt;&amp;nbsp; else if (contains(list.distractorX1.currentvalue, ".N")) expressions.category = "incongruent";&lt;br/&gt;]&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;if (expressions.category== "congruent") values.count_congruent += 1;&lt;br/&gt;&amp;nbsp; else if (expressions.category== "incongruent") values.count_incongruent += 1;&lt;br/&gt;]&lt;br/&gt;/ ontrialend = [trial.set3X1.resetstimulusframes(); ]&lt;br/&gt;/ stimulustimes = [1=fixation; 500=sequence (fixationcover, XLD1); 600=sequence (eraser1, eraser2, eraser3, eraser4, eraser5, eraser6, eraserleft, eraserright)]&lt;br/&gt;/ validresponse = ("J", "I")&lt;br/&gt;/ correctresponse = ("J")&lt;br/&gt;/ response = timeout(2000)&lt;br/&gt;/ beginresponsetime = 500&lt;br/&gt;/ ontrialend = [&lt;br/&gt;if (trial.set3X1.latency &amp;gt;= parameters.minimum_latency)&lt;br/&gt;values.valid = 1;&lt;br/&gt;if (values.valid == 1) {&lt;br/&gt;if (trial.set3X1.correct) {&lt;br/&gt;values.validcorrect = 1;&lt;br/&gt;values.sumcorrect += 1;&lt;br/&gt;values.sumrt += trial.set3X1.latency&lt;br/&gt;if (expressions.category == "congruent") {&lt;br/&gt;values.sumcorrect_congruent += 1;&lt;br/&gt;values.sumrt_congruent += trial.set3X1.latency;&lt;br/&gt;list.latencies_congruent.insertitem(trial.set3X1.latency, 1);&lt;br/&gt;list.latencies.insertitem(trial.set3X1.latency, 1);&lt;br/&gt;} else {&lt;br/&gt;values.sumcorrect_incongruent += 1;&lt;br/&gt;values.sumrt_incongruent += trial.set3X1.latency;&lt;br/&gt;list.latencies_incongruent.insertitem(trial.set3X1.latency, 1);&lt;br/&gt;list.latencies.insertitem(trial.set3X1.latency, 1);&lt;br/&gt;}&lt;br/&gt;}&lt;br/&gt;} ;&lt;br/&gt;list.accuracy.insertitem(values.validcorrect, 1);&lt;br/&gt;values.testeracc = list.accuracy.currentindex&lt;br/&gt;if (expressions.category == "congruent") {&lt;br/&gt;list.accuracy_congruent.insertitem(values.validcorrect, 1);&lt;br/&gt;} else {&lt;br/&gt;list.accuracy_incongruent.insertitem(values.validcorrect, 1);&lt;br/&gt;};&lt;br/&gt;]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;If there a way of using more lists to link these together?&lt;br/&gt;&lt;br/&gt;I have attached the whole script too (with supporting files)&lt;br/&gt;&lt;br/&gt;Thanks</description><pubDate>Tue, 03 Oct 2017 04:49:47 GMT</pubDate><dc:creator>jm560@sussex.ac.uk</dc:creator></item><item><title>RE: counterbalancing with lists</title><link>https://forums.millisecond.com/Topic22636.aspx</link><description>&lt;div data-id="22634" class="if-quote-wrapper" unselectable="on" data-guid="1507031379230"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22634" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="22634" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="22634" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Monday, October 2, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-22634"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="22623" class="if-quote-wrapper" unselectable="on" data-guid="1507031379230"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22623" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="22623" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="22623" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Monday, October 2, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-22623"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="22622" class="if-quote-wrapper" unselectable="on" data-guid="1507031379230"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22622" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="22622" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="22622" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;&lt;a href="mailto:jm560@sussex.ac.uk"&gt;jm560@sussex.ac.uk&lt;/a&gt; - Monday, October 2, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-22622"&gt;&lt;div class="if-quote-message-margin"&gt;Hi,&lt;br/&gt;&lt;br/&gt;I have a counterbalancing problem on my visual search task I am not sure how to fix.&lt;br/&gt;&lt;br/&gt;My task has 12 different types of trials in a block (two different target letters each in 6 possible positions). The trials must be randomly selected (which they are). The unselected other 5 locations are filled by filler letters - picked from 5 lists. Two of the filler letters are actual letters and three are small O's. The filler letters are counterbalanced with each other so there are 48 combinations each - this is done by randomly selecting the first letter and then the other lists select from list.1.currentindex.&lt;br/&gt;&lt;br/&gt;But I made a mistake as the filler letter identity and positions are not connected to the position of the target letter (the trial). I need the filler letters to&amp;nbsp; be next to the target letter I.e if the target is in pos 1 then filler letter 1 will be in pos 2 and filler letter 2 will be in pos 3 (so they are both next to the target letter and not separated by small O filler letters). I also need the trial to be linked to the filler letter order.&lt;br/&gt;&lt;br/&gt;So that on list s3filler1 below. Every 6th letter is presented on trial.set3X1 (also below) (so the 1st, 6th, 13th and so on) and this letter is always presented in position 2.&lt;br/&gt;&lt;br/&gt;&amp;lt;list s3filler1&amp;gt;&lt;br/&gt;/ items = (picture.H1, picture.Z1, picture.O1, picture.M1, picture.K1, picture.O1, picture.W1, picture.H1, picture.O1, picture.Z1, picture.K1, picture.O1, picture.M1, picture.W1, picture.O1, picture.H1, picture.Z1, picture.O1, picture.M1, picture.K1, &lt;br/&gt;picture.O1, picture.W1, picture.H1, picture.O1, picture.Z1, picture.K1, picture.O1, picture.M1, picture.W1, picture.O1, picture.H1, picture.Z1, picture.O1, picture.M1, picture.K1, picture.O1, picture.W1, picture.H1, picture.O1, picture.Z1, picture.K1, &lt;br/&gt;picture.O1, picture.M1, picture.W1, picture.O1, picture.Z1, picture.K1, picture.O1)&lt;br/&gt;/ select = random&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial set3X1&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;values.valid = 0;&lt;br/&gt;values.validcorrect = 0;&lt;br/&gt;values.trialcount += 1]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler1.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler2.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler3.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler4.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler5.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [values.fillerhpos1 = expressions.hp2]&lt;br/&gt;/ ontrialbegin = [values.fillerhpos2 = expressions.hp3]&lt;br/&gt;/ ontrialbegin = [values.fillerhpos3 = expressions.hp4]&lt;br/&gt;/ ontrialbegin = [values.fillerhpos4 = expressions.hp5]&lt;br/&gt;/ ontrialbegin = [values.fillerhpos5 = expressions.hp6]&lt;br/&gt;/ ontrialbegin = [values.fillervpos1 = expressions.vp2]&lt;br/&gt;/ ontrialbegin = [values.fillervpos2 = expressions.vp3]&lt;br/&gt;/ ontrialbegin = [values.fillervpos3 = expressions.vp4]&lt;br/&gt;/ ontrialbegin = [values.fillervpos4 = expressions.vp5]&lt;br/&gt;/ ontrialbegin = [values.fillervpos5 = expressions.vp6]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.distractorX1.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [values.distractor = list.distractorX1.currentvalue;]&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;if (contains(list.distractorX1.currentvalue, ".X")) expressions.category = "congruent"&lt;br/&gt;&amp;nbsp; else if (contains(list.distractorX1.currentvalue, ".N")) expressions.category = "incongruent";&lt;br/&gt;]&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;if (expressions.category== "congruent") values.count_congruent += 1;&lt;br/&gt;&amp;nbsp; else if (expressions.category== "incongruent") values.count_incongruent += 1;&lt;br/&gt;]&lt;br/&gt;/ ontrialend = [trial.set3X1.resetstimulusframes(); ]&lt;br/&gt;/ stimulustimes = [1=fixation; 500=sequence (fixationcover, XLD1); 600=sequence (eraser1, eraser2, eraser3, eraser4, eraser5, eraser6, eraserleft, eraserright)]&lt;br/&gt;/ validresponse = ("J", "I")&lt;br/&gt;/ correctresponse = ("J")&lt;br/&gt;/ response = timeout(2000)&lt;br/&gt;/ beginresponsetime = 500&lt;br/&gt;/ ontrialend = [&lt;br/&gt;if (trial.set3X1.latency &amp;gt;= parameters.minimum_latency)&lt;br/&gt;values.valid = 1;&lt;br/&gt;if (values.valid == 1) {&lt;br/&gt;if (trial.set3X1.correct) {&lt;br/&gt;values.validcorrect = 1;&lt;br/&gt;values.sumcorrect += 1;&lt;br/&gt;values.sumrt += trial.set3X1.latency&lt;br/&gt;if (expressions.category == "congruent") {&lt;br/&gt;values.sumcorrect_congruent += 1;&lt;br/&gt;values.sumrt_congruent += trial.set3X1.latency;&lt;br/&gt;list.latencies_congruent.insertitem(trial.set3X1.latency, 1);&lt;br/&gt;list.latencies.insertitem(trial.set3X1.latency, 1);&lt;br/&gt;} else {&lt;br/&gt;values.sumcorrect_incongruent += 1;&lt;br/&gt;values.sumrt_incongruent += trial.set3X1.latency;&lt;br/&gt;list.latencies_incongruent.insertitem(trial.set3X1.latency, 1);&lt;br/&gt;list.latencies.insertitem(trial.set3X1.latency, 1);&lt;br/&gt;}&lt;br/&gt;}&lt;br/&gt;} ;&lt;br/&gt;list.accuracy.insertitem(values.validcorrect, 1);&lt;br/&gt;values.testeracc = list.accuracy.currentindex&lt;br/&gt;if (expressions.category == "congruent") {&lt;br/&gt;list.accuracy_congruent.insertitem(values.validcorrect, 1);&lt;br/&gt;} else {&lt;br/&gt;list.accuracy_incongruent.insertitem(values.validcorrect, 1);&lt;br/&gt;};&lt;br/&gt;]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;If there a way of using more lists to link these together?&lt;br/&gt;&lt;br/&gt;I have attached the whole script too (with supporting files)&lt;br/&gt;&lt;br/&gt;Thanks&lt;a class="if-quote-goto quote-link" href="#" data-id="22622"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;I'm not sure I understand the desired position-setup from your description, but of course you can simply put the desired positions in additional &amp;lt;list&amp;gt;s and link those to the other / existing lists as needed.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="22623"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;To clarify a bit, when you have&lt;br/&gt;&lt;br/&gt;&amp;lt;list s3filler1&amp;gt;&lt;br/&gt;/ items = (picture.H1, picture.Z1, picture.O1, picture.M1, picture.K1, picture.O1, picture.W1, picture.H1, picture.O1, picture.Z1, picture.K1, picture.O1, picture.M1, picture.W1, picture.O1, picture.H1, picture.Z1, picture.O1, picture.M1, picture.K1, &lt;br/&gt;picture.O1, picture.W1, picture.H1, picture.O1, picture.Z1, picture.K1, picture.O1, picture.M1, picture.W1, picture.O1, picture.H1, picture.Z1, picture.O1, picture.M1, picture.K1, picture.O1, picture.W1, picture.H1, picture.O1, picture.Z1, picture.K1, &lt;br/&gt;picture.O1, picture.M1, picture.W1, picture.O1, picture.Z1, picture.K1, picture.O1)&lt;br/&gt;/ select = random&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;and you -- hypothetically -- want to have the 1stitem in that list be located in position #2, the 2nd in position #4,, etc. you'd define&lt;br/&gt;&lt;br/&gt;&amp;lt;list s3filler1_h&amp;gt;&lt;br/&gt;/ items = (expressions.hp2, expressions.hp4, ...)&lt;br/&gt;/ select = list.s3filler1.currentindex&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list s3filler1_v&amp;gt;&lt;br/&gt;/ items = (expressions.vp2, expressions.vp4, ...)&lt;br/&gt;/ select = list.s3filler1.currentindex&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;with &lt;br/&gt;&lt;br/&gt;&amp;lt;trial set3X1&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;values.valid = 0;&lt;br/&gt;values.validcorrect = 0;&lt;br/&gt;values.trialcount += 1]&lt;br/&gt;...&lt;br/&gt;/ ontrialbegin = [values.fillerhpos1 = list.s3filler1_h.nextvalue]&lt;br/&gt;...&lt;br/&gt;/ ontrialbegin = [values.fillervpos1 =&amp;nbsp; list.s3filler1_v.nextvalue]&lt;br/&gt;...&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;Does that make it clearer?&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="22634"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Yes this is great, thank you!</description><pubDate>Tue, 03 Oct 2017 04:49:47 GMT</pubDate><dc:creator>jm560@sussex.ac.uk</dc:creator></item><item><title>RE: counterbalancing with lists</title><link>https://forums.millisecond.com/Topic22634.aspx</link><description>&lt;div data-id="22623" class="if-quote-wrapper" unselectable="on" data-guid="1506980643133"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22623" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="22623" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="22623" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Monday, October 2, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-22623"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="22622" class="if-quote-wrapper" unselectable="on" data-guid="1506980643133"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22622" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="22622" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="22622" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;&lt;a href="mailto:jm560@sussex.ac.uk"&gt;jm560@sussex.ac.uk&lt;/a&gt; - Monday, October 2, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-22622"&gt;&lt;div class="if-quote-message-margin"&gt;Hi,&lt;br/&gt;&lt;br/&gt;I have a counterbalancing problem on my visual search task I am not sure how to fix.&lt;br/&gt;&lt;br/&gt;My task has 12 different types of trials in a block (two different target letters each in 6 possible positions). The trials must be randomly selected (which they are). The unselected other 5 locations are filled by filler letters - picked from 5 lists. Two of the filler letters are actual letters and three are small O's. The filler letters are counterbalanced with each other so there are 48 combinations each - this is done by randomly selecting the first letter and then the other lists select from list.1.currentindex.&lt;br/&gt;&lt;br/&gt;But I made a mistake as the filler letter identity and positions are not connected to the position of the target letter (the trial). I need the filler letters to&amp;nbsp; be next to the target letter I.e if the target is in pos 1 then filler letter 1 will be in pos 2 and filler letter 2 will be in pos 3 (so they are both next to the target letter and not separated by small O filler letters). I also need the trial to be linked to the filler letter order.&lt;br/&gt;&lt;br/&gt;So that on list s3filler1 below. Every 6th letter is presented on trial.set3X1 (also below) (so the 1st, 6th, 13th and so on) and this letter is always presented in position 2.&lt;br/&gt;&lt;br/&gt;&amp;lt;list s3filler1&amp;gt;&lt;br/&gt;/ items = (picture.H1, picture.Z1, picture.O1, picture.M1, picture.K1, picture.O1, picture.W1, picture.H1, picture.O1, picture.Z1, picture.K1, picture.O1, picture.M1, picture.W1, picture.O1, picture.H1, picture.Z1, picture.O1, picture.M1, picture.K1, &lt;br/&gt;picture.O1, picture.W1, picture.H1, picture.O1, picture.Z1, picture.K1, picture.O1, picture.M1, picture.W1, picture.O1, picture.H1, picture.Z1, picture.O1, picture.M1, picture.K1, picture.O1, picture.W1, picture.H1, picture.O1, picture.Z1, picture.K1, &lt;br/&gt;picture.O1, picture.M1, picture.W1, picture.O1, picture.Z1, picture.K1, picture.O1)&lt;br/&gt;/ select = random&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial set3X1&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;values.valid = 0;&lt;br/&gt;values.validcorrect = 0;&lt;br/&gt;values.trialcount += 1]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler1.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler2.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler3.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler4.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler5.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [values.fillerhpos1 = expressions.hp2]&lt;br/&gt;/ ontrialbegin = [values.fillerhpos2 = expressions.hp3]&lt;br/&gt;/ ontrialbegin = [values.fillerhpos3 = expressions.hp4]&lt;br/&gt;/ ontrialbegin = [values.fillerhpos4 = expressions.hp5]&lt;br/&gt;/ ontrialbegin = [values.fillerhpos5 = expressions.hp6]&lt;br/&gt;/ ontrialbegin = [values.fillervpos1 = expressions.vp2]&lt;br/&gt;/ ontrialbegin = [values.fillervpos2 = expressions.vp3]&lt;br/&gt;/ ontrialbegin = [values.fillervpos3 = expressions.vp4]&lt;br/&gt;/ ontrialbegin = [values.fillervpos4 = expressions.vp5]&lt;br/&gt;/ ontrialbegin = [values.fillervpos5 = expressions.vp6]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.distractorX1.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [values.distractor = list.distractorX1.currentvalue;]&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;if (contains(list.distractorX1.currentvalue, ".X")) expressions.category = "congruent"&lt;br/&gt;&amp;nbsp; else if (contains(list.distractorX1.currentvalue, ".N")) expressions.category = "incongruent";&lt;br/&gt;]&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;if (expressions.category== "congruent") values.count_congruent += 1;&lt;br/&gt;&amp;nbsp; else if (expressions.category== "incongruent") values.count_incongruent += 1;&lt;br/&gt;]&lt;br/&gt;/ ontrialend = [trial.set3X1.resetstimulusframes(); ]&lt;br/&gt;/ stimulustimes = [1=fixation; 500=sequence (fixationcover, XLD1); 600=sequence (eraser1, eraser2, eraser3, eraser4, eraser5, eraser6, eraserleft, eraserright)]&lt;br/&gt;/ validresponse = ("J", "I")&lt;br/&gt;/ correctresponse = ("J")&lt;br/&gt;/ response = timeout(2000)&lt;br/&gt;/ beginresponsetime = 500&lt;br/&gt;/ ontrialend = [&lt;br/&gt;if (trial.set3X1.latency &amp;gt;= parameters.minimum_latency)&lt;br/&gt;values.valid = 1;&lt;br/&gt;if (values.valid == 1) {&lt;br/&gt;if (trial.set3X1.correct) {&lt;br/&gt;values.validcorrect = 1;&lt;br/&gt;values.sumcorrect += 1;&lt;br/&gt;values.sumrt += trial.set3X1.latency&lt;br/&gt;if (expressions.category == "congruent") {&lt;br/&gt;values.sumcorrect_congruent += 1;&lt;br/&gt;values.sumrt_congruent += trial.set3X1.latency;&lt;br/&gt;list.latencies_congruent.insertitem(trial.set3X1.latency, 1);&lt;br/&gt;list.latencies.insertitem(trial.set3X1.latency, 1);&lt;br/&gt;} else {&lt;br/&gt;values.sumcorrect_incongruent += 1;&lt;br/&gt;values.sumrt_incongruent += trial.set3X1.latency;&lt;br/&gt;list.latencies_incongruent.insertitem(trial.set3X1.latency, 1);&lt;br/&gt;list.latencies.insertitem(trial.set3X1.latency, 1);&lt;br/&gt;}&lt;br/&gt;}&lt;br/&gt;} ;&lt;br/&gt;list.accuracy.insertitem(values.validcorrect, 1);&lt;br/&gt;values.testeracc = list.accuracy.currentindex&lt;br/&gt;if (expressions.category == "congruent") {&lt;br/&gt;list.accuracy_congruent.insertitem(values.validcorrect, 1);&lt;br/&gt;} else {&lt;br/&gt;list.accuracy_incongruent.insertitem(values.validcorrect, 1);&lt;br/&gt;};&lt;br/&gt;]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;If there a way of using more lists to link these together?&lt;br/&gt;&lt;br/&gt;I have attached the whole script too (with supporting files)&lt;br/&gt;&lt;br/&gt;Thanks&lt;a class="if-quote-goto quote-link" href="#" data-id="22622"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;I'm not sure I understand the desired position-setup from your description, but of course you can simply put the desired positions in additional &amp;lt;list&amp;gt;s and link those to the other / existing lists as needed.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="22623"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;To clarify a bit, when you have&lt;br/&gt;&lt;br/&gt;&amp;lt;list s3filler1&amp;gt;&lt;br/&gt;/ items = (picture.H1, picture.Z1, picture.O1, picture.M1, picture.K1, picture.O1, picture.W1, picture.H1, picture.O1, picture.Z1, picture.K1, picture.O1, picture.M1, picture.W1, picture.O1, picture.H1, picture.Z1, picture.O1, picture.M1, picture.K1, &lt;br/&gt;picture.O1, picture.W1, picture.H1, picture.O1, picture.Z1, picture.K1, picture.O1, picture.M1, picture.W1, picture.O1, picture.H1, picture.Z1, picture.O1, picture.M1, picture.K1, picture.O1, picture.W1, picture.H1, picture.O1, picture.Z1, picture.K1, &lt;br/&gt;picture.O1, picture.M1, picture.W1, picture.O1, picture.Z1, picture.K1, picture.O1)&lt;br/&gt;/ select = random&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;and you -- hypothetically -- want to have the 1stitem in that list be located in position #2, the 2nd in position #4,, etc. you'd define&lt;br/&gt;&lt;br/&gt;&amp;lt;list s3filler1_h&amp;gt;&lt;br/&gt;/ items = (expressions.hp2, expressions.hp4, ...)&lt;br/&gt;/ select = list.s3filler1.currentindex&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list s3filler1_v&amp;gt;&lt;br/&gt;/ items = (expressions.vp2, expressions.vp4, ...)&lt;br/&gt;/ select = list.s3filler1.currentindex&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;with &lt;br/&gt;&lt;br/&gt;&amp;lt;trial set3X1&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;values.valid = 0;&lt;br/&gt;values.validcorrect = 0;&lt;br/&gt;values.trialcount += 1]&lt;br/&gt;...&lt;br/&gt;/ ontrialbegin = [values.fillerhpos1 = list.s3filler1_h.nextvalue]&lt;br/&gt;...&lt;br/&gt;/ ontrialbegin = [values.fillervpos1 =&amp;nbsp; list.s3filler1_v.nextvalue]&lt;br/&gt;...&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;Does that make it clearer?&lt;br/&gt;</description><pubDate>Mon, 02 Oct 2017 14:50:51 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: counterbalancing with lists</title><link>https://forums.millisecond.com/Topic22623.aspx</link><description>&lt;div data-id="22622" class="if-quote-wrapper" unselectable="on" data-guid="1506966312411"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22622" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="22622" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="22622" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;&lt;a href="mailto:jm560@sussex.ac.uk"&gt;jm560@sussex.ac.uk&lt;/a&gt; - Monday, October 2, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-22622"&gt;&lt;div class="if-quote-message-margin"&gt;Hi,&lt;br/&gt;&lt;br/&gt;I have a counterbalancing problem on my visual search task I am not sure how to fix.&lt;br/&gt;&lt;br/&gt;My task has 12 different types of trials in a block (two different target letters each in 6 possible positions). The trials must be randomly selected (which they are). The unselected other 5 locations are filled by filler letters - picked from 5 lists. Two of the filler letters are actual letters and three are small O's. The filler letters are counterbalanced with each other so there are 48 combinations each - this is done by randomly selecting the first letter and then the other lists select from list.1.currentindex.&lt;br/&gt;&lt;br/&gt;But I made a mistake as the filler letter identity and positions are not connected to the position of the target letter (the trial). I need the filler letters to&amp;nbsp; be next to the target letter I.e if the target is in pos 1 then filler letter 1 will be in pos 2 and filler letter 2 will be in pos 3 (so they are both next to the target letter and not separated by small O filler letters). I also need the trial to be linked to the filler letter order.&lt;br/&gt;&lt;br/&gt;So that on list s3filler1 below. Every 6th letter is presented on trial.set3X1 (also below) (so the 1st, 6th, 13th and so on) and this letter is always presented in position 2.&lt;br/&gt;&lt;br/&gt;&amp;lt;list s3filler1&amp;gt;&lt;br/&gt;/ items = (picture.H1, picture.Z1, picture.O1, picture.M1, picture.K1, picture.O1, picture.W1, picture.H1, picture.O1, picture.Z1, picture.K1, picture.O1, picture.M1, picture.W1, picture.O1, picture.H1, picture.Z1, picture.O1, picture.M1, picture.K1, &lt;br/&gt;picture.O1, picture.W1, picture.H1, picture.O1, picture.Z1, picture.K1, picture.O1, picture.M1, picture.W1, picture.O1, picture.H1, picture.Z1, picture.O1, picture.M1, picture.K1, picture.O1, picture.W1, picture.H1, picture.O1, picture.Z1, picture.K1, &lt;br/&gt;picture.O1, picture.M1, picture.W1, picture.O1, picture.Z1, picture.K1, picture.O1)&lt;br/&gt;/ select = random&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial set3X1&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;values.valid = 0;&lt;br/&gt;values.validcorrect = 0;&lt;br/&gt;values.trialcount += 1]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler1.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler2.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler3.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler4.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler5.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [values.fillerhpos1 = expressions.hp2]&lt;br/&gt;/ ontrialbegin = [values.fillerhpos2 = expressions.hp3]&lt;br/&gt;/ ontrialbegin = [values.fillerhpos3 = expressions.hp4]&lt;br/&gt;/ ontrialbegin = [values.fillerhpos4 = expressions.hp5]&lt;br/&gt;/ ontrialbegin = [values.fillerhpos5 = expressions.hp6]&lt;br/&gt;/ ontrialbegin = [values.fillervpos1 = expressions.vp2]&lt;br/&gt;/ ontrialbegin = [values.fillervpos2 = expressions.vp3]&lt;br/&gt;/ ontrialbegin = [values.fillervpos3 = expressions.vp4]&lt;br/&gt;/ ontrialbegin = [values.fillervpos4 = expressions.vp5]&lt;br/&gt;/ ontrialbegin = [values.fillervpos5 = expressions.vp6]&lt;br/&gt;/ ontrialbegin = [trial.set3X1.insertstimulustime(list.distractorX1.nextvalue,500);]&lt;br/&gt;/ ontrialbegin = [values.distractor = list.distractorX1.currentvalue;]&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;if (contains(list.distractorX1.currentvalue, ".X")) expressions.category = "congruent"&lt;br/&gt;&amp;nbsp; else if (contains(list.distractorX1.currentvalue, ".N")) expressions.category = "incongruent";&lt;br/&gt;]&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;if (expressions.category== "congruent") values.count_congruent += 1;&lt;br/&gt;&amp;nbsp; else if (expressions.category== "incongruent") values.count_incongruent += 1;&lt;br/&gt;]&lt;br/&gt;/ ontrialend = [trial.set3X1.resetstimulusframes(); ]&lt;br/&gt;/ stimulustimes = [1=fixation; 500=sequence (fixationcover, XLD1); 600=sequence (eraser1, eraser2, eraser3, eraser4, eraser5, eraser6, eraserleft, eraserright)]&lt;br/&gt;/ validresponse = ("J", "I")&lt;br/&gt;/ correctresponse = ("J")&lt;br/&gt;/ response = timeout(2000)&lt;br/&gt;/ beginresponsetime = 500&lt;br/&gt;/ ontrialend = [&lt;br/&gt;if (trial.set3X1.latency &amp;gt;= parameters.minimum_latency)&lt;br/&gt;values.valid = 1;&lt;br/&gt;if (values.valid == 1) {&lt;br/&gt;if (trial.set3X1.correct) {&lt;br/&gt;values.validcorrect = 1;&lt;br/&gt;values.sumcorrect += 1;&lt;br/&gt;values.sumrt += trial.set3X1.latency&lt;br/&gt;if (expressions.category == "congruent") {&lt;br/&gt;values.sumcorrect_congruent += 1;&lt;br/&gt;values.sumrt_congruent += trial.set3X1.latency;&lt;br/&gt;list.latencies_congruent.insertitem(trial.set3X1.latency, 1);&lt;br/&gt;list.latencies.insertitem(trial.set3X1.latency, 1);&lt;br/&gt;} else {&lt;br/&gt;values.sumcorrect_incongruent += 1;&lt;br/&gt;values.sumrt_incongruent += trial.set3X1.latency;&lt;br/&gt;list.latencies_incongruent.insertitem(trial.set3X1.latency, 1);&lt;br/&gt;list.latencies.insertitem(trial.set3X1.latency, 1);&lt;br/&gt;}&lt;br/&gt;}&lt;br/&gt;} ;&lt;br/&gt;list.accuracy.insertitem(values.validcorrect, 1);&lt;br/&gt;values.testeracc = list.accuracy.currentindex&lt;br/&gt;if (expressions.category == "congruent") {&lt;br/&gt;list.accuracy_congruent.insertitem(values.validcorrect, 1);&lt;br/&gt;} else {&lt;br/&gt;list.accuracy_incongruent.insertitem(values.validcorrect, 1);&lt;br/&gt;};&lt;br/&gt;]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;If there a way of using more lists to link these together?&lt;br/&gt;&lt;br/&gt;I have attached the whole script too (with supporting files)&lt;br/&gt;&lt;br/&gt;Thanks&lt;a class="if-quote-goto quote-link" href="#" data-id="22622"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;I'm not sure I understand the desired position-setup from your description, but of course you can simply put the desired positions in additional &amp;lt;list&amp;gt;s and link those to the other / existing lists as needed.&lt;br/&gt;</description><pubDate>Mon, 02 Oct 2017 10:46:20 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>