Random allocation to Condition 1 or Condition 2 in Pavlovia

Hi Wake, sorry for asking you a question here.

I’m reaching out with a question about randomization in Pavlovia for an online experiment I’m conducting. In my study, participants first complete the same demographic questions. Afterward, they are randomly assigned to either Condition 1 or Condition 2, where they receive different manipulations. Finally, all participants complete the same manipulation checks and dependent variable questions.

I was wondering how I can set up the random allocation to Condition 1 or Condition 2 in Pavlovia.

Thank you very much in advance, and I look forward to hearing from you.

Hello

Online I currently use the following to assign randomly four different stimuli lists based on default participant number.

stimList = " "

if int(expInfo['participant'][:2]) % 4 == 0:
    stimList = "Liste4.xlsx"
elif int(expInfo['participant'][:2]) % 3 == 0:
    stimList = "Liste3.xlsx"
elif int(expInfo['participant'][:2]) % 2 == 0:
    stimList = "Liste2.xlsx"
else:
    stimList = "Liste1.xlsx"

Note that this does not guarantee a balanced distribution of lists in the end. If you want a balanced distribution of lists use the shelf or the vespr tool New web app. VESPR Study Portal.

Best wishes Jens

1 Like