Stroop Task Counterbalancing Issues

Hello folks :wave:

I am having some issues counterbalancing routines and need a bit of clarity.

For the Stroop task, participants hit 4 keys (a,f,h,l) for different colours. I have created 4 separate counterbalancing loops. For each loop, I have categorised the $nReps as nRepsA, nRepsB etc. I then created an outer loop and specified the conditions as a preordered excel spreadsheet. The variables on this spreadsheet match the variable names for the individual routines (nRepsA etc.). I then specify the order in which I want the routines to appear.


So theoretically this makes sense to me. The first participant (Who will do it online) will get the first set of keys and instructions, then the next participant will be matched with loop2, meaning an even number of participants will get each condition. I have set the order to sequential, and the number of reps to 4 to match the 4 rows in the spreadsheet.

However, when I run the experiment. It runs all 4 tasks sequentially. Am I missing a code component, or is there an issue with the spreadsheets and defining the variables? I am brand new to this so thanks in advance for any help :grinning:

The whole of the outer loop is presented to each participant. What you are showing is a method for randomising the order of blocks within participants.

If you want to counterbalance across participants then you should probably either use Qualtrics or my web app

Based off my understanding of your crib sheet. I would type int([expInfo[‘participant’]%4 into the outerloop, and then define the inner loop conditions as 0,1,2,3 and set their nReps to 1?

You’d need something more like:


if group == 1:
elif group == 2:
elif group == 3: