By WarrenL - 6/17/2014
Hi there,
I'm attempting to write a script for a Number Letter task where a pool of Number-Letter pairs (e.g. "A4", "B6")are presented on the screen in 2 positions. I'm having a couple of problems, mainly because I need to have a pool of potential pairs that need to be accessed by the two <text> stimuli (left side stimuli, right side stimuli) which are presented consecutively in sequencewith no repeats, no replacement.
What is the best option for this? If I implement an item pool pairs as below the <text> stimuli numberlettersleft and numberlettersright choose from the item pool exclusively, whereas would I want to happen is that if an item is used by the numberlettersleft (e.g. /1 "A3") then when numberlettersright is presented A3 is removed from the item pool, and that it doesn't repeat the same stimuli as the previous trial.
<item pairs> /1 = "A3" /2 = "B4" /3 = "C5" /4 = "D4" /5 = "G5" /6 = "E6" /7 = "A7" /8 = "U8" /9 = "I9" </item>
<text numberlettersleft> / items = pairs / select = noreplacenorepeat / hposition = 45 /vposition = 45 / color = black </text>
<trial topleftpresletter> / stimulustimes = [1=numberlettersleft] / validresponse = ("d", "f", "j", "k") </trial>
<text numberlettersright> / items = pairs / select = noreplacenorepeat / hposition = 55 /vposition = 45 / color = black </text>
<trial toprightpresletter> / stimulustimes = [1=numberlettersright] / validresponse = ("d", "f", "j", "k") </trial>
------------------------------------------------------------------------------------ *** BLOCKS ***** ------------------------------------------------------------------------------------
<block practice> /trials = [1-18=sequence(topleftpresletter,toprightpresletter)] I've also thought about implementing a list (below) but for some reason when I refer to the list in the / items tag in the text stimuli an error appears saying it cannot find the item pairs. Would using a list be a way around this and how do you refer to the list in the text stimuli? Any help at all is most appreciated - been pulling my hair out over this! Thanks in advance, Warren / selectionmode = random / items = ("A1", "B2", "C3", "D4") </list>
<text numberlettersleft> / items = pairs / select = noreplacenorepeat / hposition = 45 /vposition = 45 / color = black </text>
|
By Dave - 6/17/2014
You simply need to define a *single selection pool* for the two <text> elements using a <list> or <counter>. And, no, <list>s arent items and thus cannot be referenced via an /items attribute. They ought to be referenced via a stimulus element's /select attribute:
<item pairs> /1 = "A3" /2 = "B4" /3 = "C5" /4 = "D4" /5 = "G5" /6 = "E6" /7 = "A7" /8 = "U8" /9 = "I9" </item>
<text numberlettersleft> / items = pairs / select = list.itemlist.nextvalue
/ hposition = 45 /vposition = 45 / color = black </text>
<text numberlettersright> / items = pairs / select = list.itemlist.nextvalue / hposition = 55 /vposition = 45 / color = black </text>
<list itemlist> / items = (1,2,3,4,5,6,7,8,9) </list>
Finally, 'noreplacenorepeat' makes no sense in your scenario. The nine items are all different, so there is no way anything could possibly repeat.
|
By WarrenL - 6/19/2014
Thanks Dave - you truly are a supreme being! The single pool works perfectly now
I'm going to be a pain again and ask one more question: I've realised I may have to go a step further and have two lists of items ( list of letters <list letters> and list of digits <list digits>, below) that are combined/concatenated together randomly to form the Letter Number pair, e.g. (and I'm not sure this syntax is completely correct) presented as in the original post (left, right presentations in sequence):
<list letters> /items = ( "A", "E", "I", "U", "S", "T", "X", "V", "G") <list numbers> /items = ( "1", "3", "5", "7", "9", "4", "6", "8", "9") </list>
would I have to create an expression during the trial (in a /ontrialbegin element for example) that would select and add two of these items together in order to be presented and what would the function be? It would have to be random without replacement as well. I've tried concat but I think that is the wrong function for this...
Sorry for all the questions - again thanks for your invaluable help!
Best Warren
|
By Dave - 6/19/2014
Well, one could come up with at least a dozen ways to do this. And yes, you could pull one letter and one digit from the respective lists /ontrialbegin, concat() them store the result in a <values> entry and display that.
Or you could do:
<list letters> /items = ( "A", "E", "I", "U", "S", "T", "X", "V", "G") </list>
<list numbers> /items = ( "1", "3", "5", "7", "9", "4", "6", "8", "9") </list>
<text mytext> / items = ("<%list.letters.nextvalue%><%list.numbers.nextvalue%>") </text>
<trial mytrial> / stimulusframes = [1=mytext] / validresponse = (57) </trial>
<block myblock> / trials = [1-9=mytrial] </block>
|
|