psychopy.org | Reference | Downloads | Github

Equal Random Assignment of conditions in online experiment

URL of experiment:

Description of the problem:
I have three condition files for my experiment and I want randomly assign it to each participant one condition. Additionally, I hope to assign an equal number of participants to each condition.

Right now, I have embedded a code component in my online study that randomly assigns participants into each condition, but it does not assign participants into different conditions equally.

I was thinking of doing the assignment potentially in Qualtrics as it appears that Qualtrics has the randomizer that allowed an approximately equal number of assignments, but I am not sure how I can use the randomizer to assign my participants to different conditions since I want to redirect them from Qualtrics to Pavlovia.

Does anyone have any suggestions? Thank you so much!

I also have an additional question about redirection from Psychopy to Sona. I am using Sona to recruit participants. I am having participants complete a Qualtrics survey and then they will be redirected to Pavolovia and in the end, they will be redirected to Sona such that the credits will be automatically granted. I am confused as to how to redirect the participants back to Sona from Pavlovia. Do I simply add a routine at the end for participants to click on? How do I do it? Thanks!

Hi

I use a randomiser in the Qualtrics surver flow to assign and embedded variable which I pipe to the study URL.

However I have also written a couple of tools which may help:

https://moryscarter.com/vespr/survey.php

https://moryscarter.com/vespr/pavlovia.php

Best wishes,

Wakefield

1 Like

Thank you for your help. I have been using Qualtrics to randomly generate participant ID to my participants. Would you mind to tell me what information do you enter in the embedded variable about the randomiser in order to pipe to the study URL? I am a bit confused about that.

Then redirect to a full URL using:

https://run.pavlovia.org/Username/Experiment/html/?participant=${e://Field/participant}&id=${e://Field/id}&iv=${e://Field/iv}&order=${e://Field/order}
1 Like

That makes a lot of sense! Thank you so much!

Hello,

I hope I am not bothering you. I actually have one more question. I understand that I can add a link at the end to loop back to sona. But I am not sure how the link should’ve be composed of. Is it https://www.sona-systems.com/help/+THE PAVLOVIA EXPERIMENT LINK?

Thank you in advance for your help!

In Qualtrics I would add:

In Survey Termination Options, redirect to the full URL taken from Sona Systems in step 2, e.g.

In Pavlovia, if you added ?code=%SURVEY_CODE% to the URL then the return address would be:

$"https://yourinstallation.sona-systems.com/webstudy_credit.aspx?experiment_id=x&credit_token=y&survey_code="+expInfo['code']

1 Like

Thank you so much!

Hello, hope I am not bothering you here. Just to confirm. For the survey_code="+expInfo[‘code’]:
the ‘’ is two single quotation mark right? Thank you!

The fixed text, https://yourinstallation.sona-systems.com/webstudy_credit.aspx?experiment_id=x&credit_token=y&survey_code= is contained within double quotes, but they need to be "simple" not “intelligent”.

There’s an example in my crib sheet.

1 Like

Got it, thanks!