Using shelf to counterbalance conditions across multiple sessions

Hi all,

I’ve recently been trying to integrate the shelf feature on pavlovia to counterbalance a between-subjects randomization to one of 4 groups (50 participants per group). The tricky thing is I need the group assignment to remain stable across multiple (4) sessions which utilize different pavlovia tasks. I was experimenting with the counterbalancing feature but I cannot seem to figure out how to store the group assignment and then access it in the other sessions.

I was wondering if anyone had done something like this before or had any suggestions on the best way to do this?

Thanks in advance!

The shelf is an excellent way to store a group assignment from one session to another (or even between different experiments if you use designer scope instead of experiment). Would each participant have a consistent ID set in their URL?

The counterbalance routine should be able to assign to one of four groups. There have been some issues with it but I think you should be fine if you set each group to 50 slots on the shelf with one repeat AND you don’t have lots of participants starting at the same time. I also don’t think that group assignments from lapsed participants are reallocated yet. If these features are important, then you could try the VESPR Study Portal instead (£10 annual fee for the required features)

Thanks for your response!

Yes, each participant will have a consistent ID set by SONA (5 digits - e.g., 12345). The recent issues with the balanced assignment do have me a little concerned (I saw these detailed in another forum post).

I was originally planning on using code to assign groups based on the SONA ID (I have done something similar in the past with success for odd/even IDs), but with four categories it does assume the IDs are evenly distributed, which is impossible to control when SONA randomly assigns them.

Is it also possible to use the shelf to assign an increasing integer to a given randomized SONA ID? E.g., the first participant 12345 is assigned 101, then participant 10001 is assigned 102, etc. Would the shelf be able to store this value paired with each ID? If so, this would be an ideal solution for my own approach.

I’ll take a closer look at the VESPR portal (and appreciate the features you have created!) but I was hoping to do this entirely within PsychoPy/Pavlvoia if possible.

Thanks for your help.