Select a random sequential order out of a number of fixed orders
in OpenSesame
I have an experiment in which I have the same set of items, but I have defined 12 different sequential orders in which they will appear (these are fixed orders for balancing and priming reasons). I want one random sequence out of these 12 to be assigned to my participants. To illustrate, here are some (downsized) examples:
Order 1: apple, orange, lemon, cherry, raspberry, kiwi
Order 2: orange, lemon, cherry, apple, kiwi, raspberry
Order 3: raspberry, apple, kiwi, orange, lemon, cherry
Then Participant 1 will randomly be assigned Order 3, Participant 2 Order 1, Participant 3 Order 3, Participant 4 Order 2, etc...
How can I realize this with OpenSesame?
Comments
Hi Marie,
My advice depends a little on your setup. My approach would be to make as many files as you have, each having stored one sequence in it. The filename should be something standard with only the index being different. For example,
'trial_sequence_1.csv'Then you can add an inline_script in the beginning of the experiment in which you decide which file to load based on the participants number. You can use the modulo operator for that. So basically, divide the subject number by 12 and for each unique rest (0-11), you can assign one file:
# create a generic string and format it dynamically with the value of subject nr. modulo 12 var.filename = 'trial_sequence_{}'.format(var.subject_nr%12)In the loop table, you can then select to run the loop from file and not table and specify the file as [filename].
Does that make sense?
Eduard