Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

counterbalancing

Hi,

I would like to randomize the 6 blocks I have created, to avoid repetition effects. I've tried to do it like it is described in the video tutorial "counterbalancing" for 3 blocks, but ist doesn't work for my 6 blocks. My inline_script at the beginning of the experiment looks like this:
if self.get('subject_nr')%6==1:
b1 = 0
b2 = 1
b3 = 2
b4 = 3
b5 = 4
b6 = 5
elif self.get('subject_nr')%6==2:
b1 = 5
b2 = 0
b3 = 1
b4 = 2
b5 = 3
b6 = 4
elif self.get('subject_nr')%6==3:
b1 = 4
b2 = 5
b3 = 0
b4 = 1
b5 = 2
b6 = 3
elif self.get('subject_nr')%6==4:
b1 = 3
b2 = 4
b3 = 5
b4 = 0
b5 = 1
b6 = 2
elif self.get('subject_nr')%6==5:
b1 = 2
b2 = 3
b3 = 4
b4 = 5
b5 = 0
b6 = 1
else:
b1 = 1
b2 = 2
b3 = 3
b4 = 4
b5 = 5
b6 = 0
exp.set('b1', b1)
exp.set('b2', b2)
exp.set('b3', b3)
exp.set('b4', b4)
exp.set('b5', b5)
exp.set('b6', b6)

What am I doing wrong? I would be very glad, if you could help me once more!

Greetings
Karin

Comments

  • Aaaah, I found the error by myself. There was a typing error in the if-condition :(

Sign In or Register to comment.