Millisecond Forums

For randomizing ~

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

By 中风的少女 - 11/9/2015

hi! is there any way I could pair certain trial and openended(they will present same pic but different text) together and randomize all different pairs? I tried put them in blocks and randomize blocks in expt. It works, but since I will have 378 trials which mean 378 openened also, is there any way I could simplify this proce
By Dave - 11/9/2015

What you want to pair are the stimuli presented by the <trial> and the <openended> respectively. This you'll find covered in the "How to present stimulus pairs" topic in the documentation. In short:

<block myblock>
/ trials = [1-4=sequence(mytrial, myopenended)]
</block>

<trial mytrial>
/ stimulusframes = [1=trialstimulus, trialdescription]
/ validresponse = (57)
</trial>

<openended myopenended>
/ stimulusframes = [1=openendedstimulus, openendeddescription]
/ position = (50%, 80%)
</openended>

<text trialstimulus>
/ items = stimitems
</text>

<text trialdescription>
/ items = trialdescriptionitems
/ select = text.trialstimulus.currentindex
/ position = (50%, 60%)
</text>

<text openendedstimulus>
/ items = stimitems
/ select = text.trialstimulus.currentindex
</text>

<text openendeddescription>
/ items = openendeddescriptionitems
/ select = text.trialstimulus.currentindex
/ position = (50%, 60%)
</text>

<item stimitems>
/ 1 = "A"
/ 2 = "B"
/ 3 = "C"
/ 4 = "D"
</item>

<item trialdescriptionitems>
/ 1 = "Description A (Trial)"
/ 2 = "Description B (Trial)"
/ 3 = "Description C (Trial)"
/ 4 = "Description D (Trial)"
</item>

<item openendeddescriptionitems>
/ 1 = "Description A (Openended)"
/ 2 = "Description B (Openended)"
/ 3 = "Description C (Openended)"
/ 4 = "Description D (Openended)"
</item>
By 中风的少女 - 11/10/2015

I understand this step, but then how could I randomize the different pairs?
By Dave - 11/10/2015

The pairs are already randomized due to the selection mode of the main <text> (in your case <picture>) element.

<text trialstimulus>
/ items = stimitems
</text>

is equivalent to

<text trialstimulus>
/ items = stimitems
/ select = noreplace
</text>

If you run the code I gave you multiple times, you'll notice that the order is random.

And if you *additionally* want to randomize certain <trial>/<openended> "pairs", you do

<block myblock>
/ trials = [1-6=noreplace(a_trial, b_trial, c_trial)]
</block>

<trial a_trial>
...
/ branch = [openended.a_openended]
</trial>

<openended a_openended>
...
</openended>

<trial b_trial>
...
/ branch = [openended.b_openended]
</trial>

<openended b_openended>
...
</openended>

<trial c_trial>
...
/ branch = [openended.c_openended]
</trial>

<openended c_openended>
...
</openended>