Millisecond Forums

Item distribtuion over trials

https://forums.millisecond.com/Topic11551.aspx

By jens - 10/29/2013

Hello,


I'd like to describe a simplified version of my problem. I have six picture pairs which to presented in two different trial types. So, each picture pair has to appear on each trial (I had this problem previously but I cannot find the solution). I use a counter to couple the picture pairs. However, I do not manage to get an even distribution across trials. (Some trial specification reported below is unrelated to the problem). So, how do I achieve an even distribution such that each item appears in each trial?


<counter male>
/items = (1,1,2,2,3,3,4,4,5,5,6,6)
/select = noreplace
</counter>


<picture m.neu.pic>
/items = m.neu.item
/select = male
</picture>

<item m.neu.item>
/1 = "Stimuli/20M_NE_C.jpg"
/2 = "Stimuli/30M_NE_C.jpg"
/3 = "Stimuli/32M_NE_C.jpg"
/4 = "Stimuli/33M_NE_C.jpg"
/5 = "Stimuli/34M_NE_C.jpg"
/6 = "Stimuli/21M_NE_C.jpg"
</item>


<picture m.an.pic>
/items = m.an.item
/select = current(male)
</picture>

<item m.an.item>
/1 = "Stimuli/20M_AN_C.jpg"
/2 = "Stimuli/30M_AN_C.jpg"
/3 = "Stimuli/32M_AN_C.jpg"
/4 = "Stimuli/33M_AN_C.jpg"
/5 = "Stimuli/34M_AN_C.jpg"
/6 = "Stimuli/21M_AN_C.jpg"
</item>


<trial m.an.o.tar>
/ ontrialbegin = [picture.dot.pic.items.1 = getitem(picture.dot.hor.ver.pic, dot.counter)]
/ ontrialbegin = [if (dot.counter == 1) {values.korrekt = 36} else {values.korrekt = 33}]
/ ontrialbegin = [{picture.m.neu.pic.vposition = 75%; picture.m.an.pic.vposition = 25%; picture.dot.pic.vposition = 25%}]
/ stimulusframes = [10 = fixation.pic; 55 = maske; 56 = m.neu.pic, m.an.pic; 58 = mask1.pic, mask2.pic; 65 = maske; 66 = dot.pic]
/ validresponse = ("F", "J")
/ iscorrectresponse = [trial.m.an.o.tar.response == values.korrekt]
/ timeout = 3000
</trial>


<trial m.an.u.tar>
/ ontrialbegin = [picture.dot.pic.items.1 = getitem(picture.dot.hor.ver.pic, dot.counter)]
/ ontrialbegin = [if (dot.counter == 1) {values.korrekt = 36} else {values.korrekt = 33}]
/ ontrialbegin = [{picture.m.neu.pic.vposition = 25%; picture.m.an.pic.vposition = 75%; picture.dot.pic.vposition = 75%}]
/ stimulusframes = [10 = fixation.pic; 55 = maske; 56 = m.neu.pic, m.an.pic; 58 = mask1.pic, mask2.pic; 65 = maske; 66 = dot.pic]
/ validresponse = ("F", "J")
/ iscorrectresponse = [trial.m.an.u.tar.response == values.korrekt]
/ timeout = 3000
</trial>


<block test>
/trials = [1-12 = noreplace(m.an.o.tar, m.an.u.tar)]
/ bgstim = (topleft, topright)
</block>


Best regards Jens





By Dave - 10/30/2013

You obviously need to separate selection pools for the two trial types:


<values>
/ itemnumber = 1
</values>

<counter u>
/select = noreplace(1-6)
</counter>

<counter o>
/select = noreplace(1-6)
</counter>


<picture m.neu.pic>
/items = m.neu.item
/select = values.itemnumber
</picture>

<item m.neu.item>
/1 = "Stimuli/20M_NE_C.jpg"
/2 = "Stimuli/30M_NE_C.jpg"
/3 = "Stimuli/32M_NE_C.jpg"
/4 = "Stimuli/33M_NE_C.jpg"
/5 = "Stimuli/34M_NE_C.jpg"
/6 = "Stimuli/21M_NE_C.jpg"
</item>

<picture m.an.pic>
/items = m.an.item
/select = values.itemnumber
</picture>

<item m.an.item>
/1 = "Stimuli/20M_AN_C.jpg"
/2 = "Stimuli/30M_AN_C.jpg"
/3 = "Stimuli/32M_AN_C.jpg"
/4 = "Stimuli/33M_AN_C.jpg"
/5 = "Stimuli/34M_AN_C.jpg"
/6 = "Stimuli/21M_AN_C.jpg"
</item>

<trial m.an.o.tar>
/ ontrialbegin = [values.itemnumber=counter.o.selectedvalue]
/ ontrialbegin = [picture.dot.pic.items.1 = getitem(picture.dot.hor.ver.pic, dot.counter)]
/ ontrialbegin = [if (dot.counter == 1) {values.korrekt = 36} else {values.korrekt = 33}]
/ ontrialbegin = [{picture.m.neu.pic.vposition = 75%; picture.m.an.pic.vposition = 25%; picture.dot.pic.vposition = 25%}]
/ stimulusframes = [10 = fixation.pic; 55 = maske; 56 = m.neu.pic, m.an.pic; 58 = mask1.pic, mask2.pic; 65 = maske; 66 = dot.pic]
/ validresponse = ("F", "J")
/ iscorrectresponse = [trial.m.an.o.tar.response == values.korrekt]
/ timeout = 3000
</trial>

<trial m.an.u.tar>
/ ontrialbegin = [values.itemnumber=counter.u.selectedvalue]

/ ontrialbegin = [picture.dot.pic.items.1 = getitem(picture.dot.hor.ver.pic, dot.counter)]
/ ontrialbegin = [if (dot.counter == 1) {values.korrekt = 36} else {values.korrekt = 33}]
/ ontrialbegin = [{picture.m.neu.pic.vposition = 25%; picture.m.an.pic.vposition = 75%; picture.dot.pic.vposition = 75%}]
/ stimulusframes = [10 = fixation.pic; 55 = maske; 56 = m.neu.pic, m.an.pic; 58 = mask1.pic, mask2.pic; 65 = maske; 66 = dot.pic]
/ validresponse = ("F", "J")
/ iscorrectresponse = [trial.m.an.u.tar.response == values.korrekt]
/ timeout = 3000
</trial>

<block test>
/trials = [1-12 = noreplace(m.an.o.tar, m.an.u.tar)]
/ bgstim = (topleft, topright)
</block>

By jens - 10/30/2013

Hello,


this was obviously the solution to the problem. I wonder whether I will ever understand counters. [*-)]


Thanks a lot.


Best regards Jens

By Dave - 10/30/2013

I wonder whether I will ever understand counters.


It's actually not that hard:


Think of <trial m.an.o.tar> as your left hand and <trial m.an.u.tar> as your right hand.


Think of


<counter male>
/items = (1,1,2,2,3,3,4,4,5,5,6,6)
/select = noreplace
</counter>


as a deck of 12 cards placed in front of you. There are 6 unique cards, but there's a duplicate of every card in the deck (i.e. 2 x Queen of Hearts, 2 x Ace of Spades, etc.). You properly shuffle the deck and then proceed to draw 6 cards with your left hand and 6 cards with your right hand. It should be immediately clear that there is no guarantee whatsoever, that your left hand will end up drawing the same set of cards as the right hand (i.e. 1 x Queen of Hearts, 1 x Ace of Spades, etc. per hand).


Instead you need two decks of 6 cards each, one to draw from with your left hand, the other one to draw from with your right hand:


<counter u>
/select = noreplace(1-6)
</counter>

<counter o>
/select = noreplace(1-6)
</counter>


And that's basically all there is to it.

By jens - 10/30/2013

Hello,


very elegant and intuitive explanation [:D]


Jens