Pavlovia Surveys - How can I limit the number of participants I want to join my experiment per condition group?

Hi all,

I’m currently designing an experiment that is going to begin with participants filling out a brief screening survey that will place them into one of three groups based on their answers. I want to ensure that my three groups are evenly distributed, with the same number of participants in each group. Is there a way that I can use Pavlovia surveys to counterbalance my groups based on their answers within the survey? Ideally, if the participant’s answers were allocated to a group that was already full, a message would come up saying thanks for their time, but they could not complete the rest of the experiment due to their answers.

Would really appreciate any advice that can be given on this. Thank you in advance!


you could use either @wakecarter’s VESPR Study Portal and other VESPR tools offline or the shelf-feature of Pavlovia Using the Shelf for Multi-session testing, Counterbalancing and more online — PsychoPy v2023.1.2.

Best wishes Jens

In this case I think you need the shelf and embedded survey routines in a PsychoPy experiment. I am giving a talk on this topic at the ATSiP conference later this month.

Basically you need to retrieve the group allocation in PsychoPy, update the shelf, and then block progression if that group has reached the maximum number. Would it fit your use case if I created a simple survey (are you in group 1, 2 or 3?) and then showed how to block progression after 5 people have picked a given group number?

Hi, there! Thank you both so much for your help with this. Wakecarter that sounds pretty similar to what I’m aiming for, yes. Is it possible to do that after people have chosen multiple responses? For context, I’ll be using a standardised survey to group people based on the total score they achieve based on their answers. So I’ll want one group set to totals of 1-10, another set to 11-20, etc. Is that something that can be achieved with this method?

Thank you and JensBoelte again for your help!

Yes, that will work too – maybe I should include how to score in my demo since that’s likely to be the most common use case.

Here’s my demo

Participation Cap | code | try it

This demo is a PsychoPy experiment with two embedded surveys. The first is a consent form, and the second is the Alcohol Use Disorders Identification Test—Consumption (AUDIT-C) . The AUDIT-C is scored within the survey and then participants are allocated to low and high risk groups based on a cut-off. The number of participants in each group are tracked using the shelf. For demo purposes the participation cap itself can be selected in the expInfo dialogue box.

The shelf dictionary was created as {“low risk”: 0, “high risk”: 0}

1 Like

Hi Wakecarter!

Apologies for the very late reply, but thank you so much for this solution! I really appreciate all of your help!!