Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Participant number and running a sequence

For my new experiment I want to make sure that I am blind to the condition of the participants, because of bias.
What I want is the following. Two participants (each their own computer) will be a pair in my experiment. I want them to be in the same condition, so that the same sequence will be run. So:

Participant 1 & 2, 7 & 8, etc --> condition 1
Participant 3 & 4, 9 & 10, etc --> condition 2
Participant 5 & 6, 11 & 12, etc --> condition 3

I made the experiment, but not this part yet because I am not sure how to do this. I thought about using inline script, but I messed around a bit and it didnt work.
I also thought about using a block, and experimented with that, but it didn't work either. I'm not sure if that is possible.
If I have to type a lot of numbers, that's totally fine, because I will not need many participants.

I hope I made it clear... if not, please do tell!


  • Hi,

    I might misunderstand, but how can you be blind to the condition if it is you that define the algorithm for assigning participants to condition? Of course you could use randomization (assigning conditions randomly), but then you don't have control over the number each condition is picked. Maybe you can elaborate a little if it doesn't make sense what I say.

    Anyway, if you don't really care for randomization you can keep it simple and do something like this:

    # has to be put in an inline_script (ideally prepare phase) in the beginning of the experiment
    conditions = [cond1,cond2,cond3]
    group1 = [1,2,7,8]
    group2 = [3,4,9,10]
    group3 = [5,6,11,12]
    if var.subject_nr in group1:
        var.condition = conditions[0]
    elif var.subject_nr in group2:
        var.condition = conditions[1]
    elif var.subject_nr in group3:
        var.condition = conditions[2]

    Good luck,


  • ''I might misunderstand, but how can you be blind to the condition if it is you that define the algorithm for assigning participants to condition?''

    You are correct, it is not perfect, but at least it is better than making separate Open Sesame files per condition, I guess.

    Thank you. I do still receive the error that I have to define ''cond1'' etc.
    Can you help me with that too?

  • You have to replace cond1,cond2,cond3 with the conditions that you have. For example, if your three different conditions (that you mention in your first post), differ in terms of whether the stimulus is visual, auditory, or both, it would look like

    conditions = ['visual','auditory','both']

  • edited September 2018

    Ah. In each condition, participants will read a different piece of text. So I created three different loops.
    Here is a picture.

  • Yes, in this case conditions can be anything(e.g. 'one','two','three'). Just make sure than you put in the run if field of each sequence something like [conditions] = 'one'

    I attach an example experiment below.


  • Unfortuantly the experiment you attached doesn't want to run, saying that ''The variable 'condition' does not exist''.

  • If you run it, you need to specify a subject_nr that was coded (1-12).

  • edited September 2018

    Your experiment works now, indeed. Mine still does not. It still says ''name 'cond1' is not defined'', also when I run it with a participant number.

  • edited September 2018

    Well, you haven't changed the experiment as I told you. cond1 is a variable and does not exist until you assign a value to it (e.g. cond1 = 1). "cond1" is not a variable but a string, it does always exist, once you have defined it (e.g. some_variable = "cond1"). So to make your experiment work, when defining your variables you have to use strings not variables (unless variables were defined previously).

  • I think you mean that I have to put it between ' ' signs. I did not know you were referring to that, and I am sorry.

Sign In or Register to comment.