I’d like my experiment (run on pavlovia, interfacing with sona) to automatically assign a participant number, based on how many participants have completed the experiment. In other words, I want the first participant to be assigned participant number 1, and the next participant to be assigned participant number 2 (unless participant 1 failed to complete), and so on. I understand that it’s possible to incorporate participant IDs into links from sona, but unless I’ve missed something, those have to be hard coded rather than increment with experiment completions. Can anyone point me in the right direction? Thanks for reading!
Do you have Qualtrics? I would like Sona to Qualtrics, add a participant ID there (see these notes for how), then redirect to PsychoPy with a URL than includes participant=id and then finally back to Sona.
Thanks for your reply. I’ll have to look into Qualtrics, as I’ve never used it before. Does this mean there’s no way to do this inside PsychoPy? Cheers!
Thanks again. The issue is that I have a custom counterbalancing of stimuli based on participant number, so I want one participant for each participant number (restricted to 1-30). It turns out my university does have qualtrics but I’ve never used it and fear that adding two new platforms (haven’t used psychopy before either) in one experiment is asking for trouble. I’ll look into the sona random id variable to see if that will work - is that a fairly easy tweak? Cheers!
I’m planning to use Qualtrics for all online PsychoPy experiments to present the PI sheet, gather demographics and assign equally to conditions. The link to my notes above also has details about how to create a custom Sona link. I also have some Qualtrics and PsychoPy primer slides at https://moryscarter.com/vespr/
An ID from Qualtrics will increment whether or not the participant completes the PsychoPy so that aspect will be tricky anyway. You’d probably need to keep an eye on which participant numbers have completed and reuse other counterbalancing orders.
The page takes four parameters: folder, experiment, id and researcher.
folder (required) is your Pavlovia username
experiment (required) is your experiment name as formatted for the study link
id (optional) is a unique code which you could assign, for example as a random number in Qualtrics, so you can link your PsychoPy data back. It is passed to Pavlovia unchanged
researcher (optional) is also passed to Pavlovia unchanged. I am using it to ensure that participants start in Qualtrics where they can view the participant information sheet, not Pavlovia.
participant is assigned by my app. as a consecutive number. You could use a modulus of participant in order to assign participants to conditions. The number increments whether or not the participant finishes. It would be considerably more complicated to re-assign aborted participant numbers.
However I’m not sure why but it doesn’t work with my study, there’s a 404 Not Found error even though the folder and the experiment name are right. Maybe it’s because there’s an underscore in my experiment name?
Hi ! @wakecarter I tried to use your app on one of my experiments. But participant number started at 2 instead of 1 and when I click again on the URL i have got a ‘403 forbidden’ error message. Plus participant number seems to be incremented 2 by 2. Right now I am still testing so is it possible to reset participant numbers to restart at 1 ?
The 403 error may be because your experiment isn’t in the html folder. In that case add a / to the end of your experiment name.
There isn’t a particular reason to start participant numbers at 1. However, there is a good reason not to allow remote resetting of the numbers (in case it is done by accident and real participants have duplicate numbers). You could always “wind it forward” to a whole number so your first participant is 11 (or whatever).
I’m not sure about the incrementing by 2. If that keeps happening, please message me the link you are using so I can test.
Hello,
I am currently running an online experiment with the webapp for participant’s number and it appears that 3 participants got the same number and I don’t know how it is even possible.
Do you know where the problem might come from ?
Might one participant have shared their experiment URL with others – or refreshed their browser and started the experiment again using the same link? The times of the different log files might help decipher this. Are you saving incomplete data?
Hi Wakefield, thank you for this. Unfortunately for me it doesn’t work as the new link just goes to 404 not found. Do you know why this might be?
Thank You
Hello,
Can we use this url also while running the experiment (not just pilot). I have not yet tried to run the experiment so I’m not sure how this would work.
It’s easier to use this for experiments than pilots because then you don’t have to add the pilot code.
I’m not sure of the question. I recommend that you try it and don’t worry that your first real participant isn’t participant 1. If you want to reset the numbering, you can use my VESPR Study Portal instead.
Hello!
Thanks @wakecarter for all the info and the helpful app. I’m building an online experiment where having an increasing participant ID is crucial as I’m implementing a lot of unique trials (~15000) and I’m using the ID to assign small trials batches to different participants. Your app. would solve my problem. I have a related question: I read on https://moryscarter.com/vespr/ that there is the possibility with a subscription to restart the ID from 1. Is this option also available if I’m running my study on Pavlovia and through Prolific, or is it only for studies shared through the VESPR portal?
I would really appreciate any help!