Millisecond Forums

Keeping Randomly Selected Faces Across Blocks

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

By npalt123 - 5/15/2017

Hi All,

For an experiment I am trying to program I want to randomly select 20 image files from a large set (+500), present them (in a random order) in one block and get ratings; and then in another block present the same set of images (in a random order) and get other ratings.

Is this possible?  My hunch from reviewing other forum questions is that the counter element could be used however I am uncertain how to keep the randomly selected image set the same across the two different ratings trials.

Best,
Nicholas
By Dave - 5/15/2017

npalt123 - Monday, May 15, 2017
Hi All,

For an experiment I am trying to program I want to randomly select 20 image files from a large set (+500), present them (in a random order) in one block and get ratings; and then in another block present the same set of images (in a random order) and get other ratings.

Is this possible?  My hunch from reviewing other forum questions is that the counter element could be used however I am uncertain how to keep the randomly selected image set the same across the two different ratings trials.

Best,
Nicholas

Basically, you'd have a <list> containing the full set of 500 item numbers. You'd then select 20 item numbers from that "master" list /onexpbegin and store those in a separate (initially empty) <list>. You would use that latter <list> for item selection. Simple example using <text> stimuli (works the same for <picture> stimuli):

// full set of item numbers is 10 in this example
<list masterlist>
/ poolsize = 10
/ selectionrate = always
</list>

// empty list to store randomly selected subset
<list selectionlist>
</list>

// select 5 item numbers at random,
// store subset in list.selectionlist
<expt>
/ onexptbegin = [
    list.selectionlist.appenditem(list.masterlist.nextindex);
    list.selectionlist.appenditem(list.masterlist.nextindex);
    list.selectionlist.appenditem(list.masterlist.nextindex);
    list.selectionlist.appenditem(list.masterlist.nextindex);
    list.selectionlist.appenditem(list.masterlist.nextindex);
]
/ blocks = [1=block_a; 2=block_b]
</expt>

<text mytext>
/ items = myitems
/ select = list.selectionlist.nextvalue
</text>

<item myitems>
/ 1 = "A"
/ 2 = "B"
/ 3 = "C"
/ 4 = "D"
/ 5 = "E"
/ 6 = "F"
/ 7 = "G"
/ 8 = "H"
/ 9 = "I"
/ 10 = "J"
</item>

// the 1st block
<block block_a>
/ preinstructions = (page_a)
/ trials = [1-5 = trial_a]
</block>

<page page_a>
^this is the 1st block
^5 selected items will be displayed in random order
</page>

<trial trial_a>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

// the 2nd block
<block block_b>
/ preinstructions = (page_b)
/ trials = [1-5 = trial_b]
</block>

<page page_b>
^this is the 2nd block
^5 selected items will be displayed in random order
</page>

<trial trial_b>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>
By npalt123 - 5/16/2017

Dave - Monday, May 15, 2017
npalt123 - Monday, May 15, 2017
Hi All,

For an experiment I am trying to program I want to randomly select 20 image files from a large set (+500), present them (in a random order) in one block and get ratings; and then in another block present the same set of images (in a random order) and get other ratings.

Is this possible?  My hunch from reviewing other forum questions is that the counter element could be used however I am uncertain how to keep the randomly selected image set the same across the two different ratings trials.

Best,
Nicholas

Basically, you'd have a <list> containing the full set of 500 item numbers. You'd then select 20 item numbers from that "master" list /onexpbegin and store those in a separate (initially empty) <list>. You would use that latter <list> for item selection. Simple example using <text> stimuli (works the same for <picture> stimuli):

// full set of item numbers is 10 in this example
<list masterlist>
/ poolsize = 10
/ selectionrate = always
</list>

// empty list to store randomly selected subset
<list selectionlist>
</list>

// select 5 item numbers at random,
// store subset in list.selectionlist
<expt>
/ onexptbegin = [
    list.selectionlist.appenditem(list.masterlist.nextindex);
    list.selectionlist.appenditem(list.masterlist.nextindex);
    list.selectionlist.appenditem(list.masterlist.nextindex);
    list.selectionlist.appenditem(list.masterlist.nextindex);
    list.selectionlist.appenditem(list.masterlist.nextindex);
]
/ blocks = [1=block_a; 2=block_b]
</expt>

<text mytext>
/ items = myitems
/ select = list.selectionlist.nextvalue
</text>

<item myitems>
/ 1 = "A"
/ 2 = "B"
/ 3 = "C"
/ 4 = "D"
/ 5 = "E"
/ 6 = "F"
/ 7 = "G"
/ 8 = "H"
/ 9 = "I"
/ 10 = "J"
</item>

// the 1st block
<block block_a>
/ preinstructions = (page_a)
/ trials = [1-5 = trial_a]
</block>

<page page_a>
^this is the 1st block
^5 selected items will be displayed in random order
</page>

<trial trial_a>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

// the 2nd block
<block block_b>
/ preinstructions = (page_b)
/ trials = [1-5 = trial_b]
</block>

<page page_b>
^this is the 2nd block
^5 selected items will be displayed in random order
</page>

<trial trial_b>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

Hi Dave,

This worked perfectly, thank you!