Millisecond Forums

randomly use one (out of 4) picture in a trial

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

By xizhouxie - 11/4/2019

Sorry if this question has been asked. I tried searching and I couldn't find answers.

I have 3 trials (correct, incorrect, mixed) and 4 picture sets (A,B,C,D). The picture sets each has 3 items in them. For each participant, I want the "correct" trial to use randomly 1 out of the 4 picture sets, and so on for all 3 trials. How can I do that?
By Dave - 11/4/2019

xizhouxie - 11/4/2019
Sorry if this question has been asked. I tried searching and I couldn't find answers.

I have 3 trials (correct, incorrect, mixed) and 4 picture sets (A,B,C,D). The picture sets each has 3 items in them. For each participant, I want the "correct" trial to use randomly 1 out of the 4 picture sets, and so on for all 3 trials. How can I do that?

You can do something like this:

<trial correct>
/ ontrialbegin = [
values.setnumber = values.correctset;
]
/ stimulusframes = [1=correctstim, trialinfo]
/ validresponse = (57)
</trial>

<text correctstim>
/ items = setitems
/ select = list.setlist.nextvalue
</text>

<trial incorrect>
/ ontrialbegin = [
values.setnumber = values.incorrectset;
]
/ stimulusframes = [1=incorrectstim, trialinfo]
/ validresponse = (57)
</trial>

<text incorrectstim>
/ items = setitems
/ select = list.setlist.nextvalue
</text>

<trial mixed>
/ ontrialbegin = [
values.setnumber = values.mixedset;
]
/ stimulusframes = [1=mixedstim, trialinfo]
/ validresponse = (57)
</trial>

<text mixedstim>
/ items = setitems
/ select = list.setlist.nextvalue
</text>

<list setnumbers>
/ items = (1,2,3,4)
/ selectionrate = always
</list>

<list setlist>
/ items = (list.set_a.nextvalue, list.set_b.nextvalue, list.set_c.nextvalue, list.set_d.nextvalue)
/ selectionmode = values.setnumber
</list>


// set a: items 1 to 3
<list set_a>
/ items = (1,2,3)
</list>

// set b: items 4 to 6
<list set_b>
/ items = (4,5,6)
</list>

// set c: items 7 to 9
<list set_c>
/ items = (7,8,9)
</list>

// set d: items 10 to 12
<list set_d>
/ items = (10,11,12)
</list>

<item setitems>
/ 1 = "a1.jpg"
/ 2 = "a2.jpg"
/ 3 = "a3.jpg"

/ 4 = "b1.jpg"
/ 5 = "b2.jpg"
/ 6 = "b3.jpg"

/ 7 = "c1.jpg"
/ 8 = "c2.jpg"
/ 9 = "c3.jpg"

/ 10 = "d1.jpg"
/ 11 = "d2.jpg"
/ 12 = "d3.jpg"
</item>

<expt>
/ onexptbegin = [
values.correctset = list.setnumbers.nextvalue;
values.incorrectset = list.setnumbers.nextvalue;
values.mixedset = list.setnumbers.nextvalue;
]
/ blocks = [1=example]
</expt>

<block example>
/ trials = [1-9 = noreplace(correct, incorrect, mixed)]
</block>

<values>
/ setnumber = 1
/ correctset = 1
/ incorrectset = 1
/ mixedset = 1
</values>

<text trialinfo>
/ items = ("<%script.currenttrial%>")
/ position = (50%, 10%)
</text>