Adding a break in a counterbalanced design

Hello everyone!

I’m trying to add a break in my counterbalanced design. By inserting a routine called “break_2” in the design, it just puts the break at the beginning and the end when it is the first condition, and in the middle when it is the second condition.

How can I fix that?

Thank you!


Hello Alexane

with counter-balancing you mean that the order of the ambiguous and neutral block are counter-balanced across participants, e.g. all participants with an odd participant-code get ambiguous and then neutral and all participants with an even participant code get neutral and then ambiguous?

I assume that is is related to the way you determine the order of the blocks. Do you mind showing us how you determine the block-order? Could you test that the behaviour is as expected when you don’t counter-balance the block-order?

When everything is equal but you are just using different stimuli in the neutral and ambiguous block, it might not be necessary to use two different loops (ambiguous, neutral block), but rather read in different rows of your stimulus file.

Best wishes Jens

Hi Jens !

Yes exactly. All my counterbalancing works, when a participant is odd they get ambiguous first, and when it is even he/she gets the neutral block first. For this, I did exactly like in the tutorial I mention above with the nReps being 0 or 1 depending on which excel sheet is chosen. All this works well. In the counterbalance loop there is: $“block”+group+“.xlsx”
In the loop ambiguous there is: blockAmbiguous.xlsx
loop neutral: blockNeutral.xlsx
And within the stimuli loops, there are my stimuli.

When it is the ambiguous block first, the break goes in the middle, but when it is the neutral block first, the break goes at the beginning of the block and at the end (weirdly). And if I put the break after the two blocks, it then comes two times, so once after each block (which I don’t want).

I maybe thought about something like:

if group = ‘neutral’ (i.e., participant = odd, I already have this code)
show break_routine_neutral (that I would place after the neutral block)
hide break_routine_ambiguous (that I would place after the ambiguous block)
elif group = ‘ambiguous’
show break_routine_ambiguous (that I would place after the ambiguous block)
hide break_routine_neutral (that I would place after the neutral block)

What do you think? I just don’t know how to write it down in good python vocabulary!

Yes indeed, I could have just done that, but I thought that if I did this as if they were different tasks, I could have added the break in the middle (which in the end doesn’t work aha)

Hello Alexane

many ways led to Rome, here are two approaches as toy-experiments. Letters or numbers come first depending on whether the participant number is odd or even. The first example uses two stimulus-lists, the second uses one stimulus-list. I don’t know whether these approaches fit your experimental procedure and requirements but they might give you a hint where to look for the error. Notice that I do not use nReps = 0 in my examples.

Example 1
counterBal2.psyexp (11.9 KB)
Letters.xlsx (8.4 KB)
Numbers.xlsx (8.4 KB)
Example 2
counterBal.psyexp (13.3 KB)
stimuli.xlsx (8.5 KB)

I assume that you set nReps wrong. You need to show us how and when you set the nReps and the loops.

Best wishes Jens

Oh I see, it is easier like that! Thank you!
First example was the one!